-2
에서 여러 번 발견 배열의 내부 배열을 만들려면 : 처음 세 세트를 참조하면이처럼 내 배열이 모습입니다 일반적인 ID가 PHP
(
[0] => stdClass Object
(
[question_id] => 2
[question] => Which career is help to achive mca?
[answer_id] => 1
[answer] => nmit bangalore is the best college ever for mca
)
[1] => stdClass Object
(
[question_id] => 2
[question] => Which career is help to achive mca?
[answer_id] => 6
[answer] => rnsit is the best college
)
[2] => stdClass Object
(
[question_id] => 2
[question] => Which career is help to achive mca?
[answer_id] => 7
[answer] => city college is best for mca
)
이 question_id
및 question
가 같은 answer_id
을하면서, 및 answer
은 세 세트에서 서로 다릅니다. 복수 응답이 하나 인 질문처럼 question_id
및 question
이없는 배열 내에서 세 가지 대답이 모두 필요합니다. 나는 PHP에서 이것을 달성하기 위해 노력하고있어.
대단히 감사합니다. @rajdeep Paul –
@ pavankumar.p 대단히 환영합니다! :-) 문제가 해결되면 대답을 수락하십시오. [스택 오버플로에 대한 대답을 수락하는 방법?] (http://meta.stackexchange.com/a/5235) –