after looking through loads of questions on here i still carnt find an answer that suits my situation.
im trying to join 2 fields from array #2 into array #1
Array #1
Array
(
[0] => Array
(
[id] => 1
[position] => top_banner_1
[name] => Top Banner 1
[order] => 1
)
[1] => Array
(
[id] => 2
[position] => left_banner_1
[name] => Left Banner 1
[order] => 2
)
)
Array #2
Array
(
[status] => 0
[countries] =>
[module_status] => 1
[top_banner_1_status] => 1
[top_banner_1_display] => 0
[left_banner_1_status] => 1
[left_banner_1_display] => 0
[left_banner_2_status] => 1
[left_banner_2_display] => 0
[left_banner_3_status] => 1
[left_banner_3_display] => 0
[left_banner_4_status] =>
[left_banner_4_display] => 0
[left_banner_5_status] =>
[left_banner_5_display] => 0
[center_banner_1_status] =>
[center_banner_1_display] => 0
[center_banner_2_status] =>
[center_banner_2_display] => 0
[right_banner_1_status] =>
[right_banner_1_display] => 0
[right_banner_2_status] =>
[right_banner_2_display] => 0
[right_banner_3_status] =>
[right_banner_3_display] => 0
[right_banner_4_status] =>
[right_banner_4_display] => 0
[right_banner_5_status] =>
[right_banner_5_display] => 0
[bottom_banner_1_status] =>
[bottom_banner_1_display] => 0
)
what i am trying to achive is:
Array
(
[0] => Array
(
[id] => 1
[position] => top_banner_1
[name] => Top Banner 1
[order] => 1
[top_banner_1_status] => 1
[top_banner_1_display] => 0
)
)
both of these arrays are comming from a database. there are 13 areas in array #1 so everything ive done so far is with foreach loops as array #2 data is fetched from a function that ideally i can't edit.
i've tried quite a few array_* functions but i'm not getting very far fast.