嗨朋友们我正在进行调查我需要从存储在其中的数组中提取一个数组
怎么做我希望根据问题 id 提取答案数组,例如 13。
我有问题ID。answer 数组与 question 相关联。
.如何根据问题ID的值从主数组中提取问题数组和答案数组,例如13
现在,如果我需要具有问题 id 及其关联 id 的数组,那么如何从我的数组结构中做到这一点?
我的代码是这样的
Array
(
[0] => Array
(
[que_info] => Array
(
[question_id] => 13
[description] => Overall Customer Satisfaction.
)
[answers] => Array
(
[0] => Array
(
[answer_id] => 45
[answer_text] => Very dissatisfied
)
)
)
[1] => Array
(
[que_info] => Array
(
[question_id] => 14
[description] => Progress (often referred to as Task Resolution or similar)
)
[answers] => Array
(
[0] => Array
(
[answer_id] => 52
[answer_text] => None
)
[1] => Array
(
[answer_id] => 53
[answer_text] => Very little
)
)
)
)
任何帮助将不胜感激 :)