问题
我有两个看起来像这样的多维数组,
第一个阵列
array(
[0] => Array
(
[course_id] => 10
[topic] => Booda-hood, advice and an important pit.
[lesson_id] => 10
)
[1] => Array
(
[course_id] => 10
[topic] => new topic
[lesson_id] => 11
)
)
第二个数组
Array
(
[0] => Array
(
[id] => 10
[description] => Lorem Ipsum is blablabla
[course_title] => Lorem Ipsum is
)
[1] => Array
(
[id] => 11
[description] => Lorem Ipsum is simply dummy text of
[course_title] => Lorem Ipsum
)
)
我想像这样组合两个数组if($1st[0]['lesson_id'] == $2nd[0]['id'])
第三阵列
array(
[0] => Array
(
[course_id] => 10
[topic] => Booda-hood, advice and an important pit.
[lesson_id] => 10
[id] => 10
[description] => Lorem Ipsum is blablabla
[course_title] => Lorem Ipsum is
)
[1] => Array
(
[course_id] => 10
[topic] => new topic
[lesson_id] => 11
[id] => 11
[description] => Lorem Ipsum is simply dummy text of
[course_title] => Lorem Ipsum
)
)
我希望我能解释一切!