Please, help me to merge two multi dimensional arrays. It looks like:
Array
(
[data] => Array
(
[1] => Array
(
[id] => 1
)
[2] => Array
(
[id] => 2
)
)
)
And second array
Array
(
[0] => stdClass Object
(
[votes] => 45
)
[1] => stdClass Object
(
[votes] => 9
)
)
Final output that i need:
Array
(
[data] => Array
(
[1] => Array
(
[id] => 1
[votes] => 1
)
[2] => Array
(
[id] => 2
[votes] => 2
)
)
)
I have tried array_merge, array_merge_recursive, and some tests with foreach. But anything can't help me:( Pls, help!