у меня есть две таблицы, как показано ниже:Как создать JSON данных из двух таблиц
стол: вопрос
id ~~ quest
———————————————
01 ~~ where is the fruit..?
02 ~~ what is the most popular name in the world..?
стол: choice_answer
idq ~~ choice
———————————————
01 ~~ mango
01 ~~ car
01 ~~ bottle
02 ~~ Jhon
02 ~~ Nina
02 ~~ Michael
И результат:
1. "where is the fruit..?"
* mango
* car
* bottle
2. "what is the most popular name in the world..?"
* Jhon
* Nina
* Michael
Как сделать данные JSON ON PH P CodeIgniter? И как создать представление с помощью ng-repeat на IONIC для результата выше?
1-ой вопрос, а затем поставить цикл вопроса и запрос огня из ans в этом цикле, а затем передать ваш массив в '$ this-> output-> set_content_type ('application/json') -> set_output (json_encode ($ your_array)); ' –