There are two arrays. The first:
Array
(
[0] => Array
(
[0] => Apple
[1] => big
)
[1] => Array
(
[0] => Orange
[1] => medium
)
[2] => Array
(
[0] => Orange
[1] => big
)
)
second
Array
(
[entries] => Array
(
[0] => Array
(
[name_item] => Apple
[price_item] => 70
[image_item] => img/apple45645.jpg
[_id] => 608e9eb364323555fb0002b2
)
[1] => Array
(
[name_item] => Orange
[price_item] => 90
[image_item] => img/ORANGE777.jpg
[_id] => 6092bc293661377e0700007c
)
)
)
I need to add data from the second array to the first one. I'm interested in the price_item and image_item fields, which correspond to the name of the array. The problem is that I don't know how to retrieve the content, relative to the object I'm looking for. Okay, if I had a key, I would use it to search and get the content, but here, in this situation, I have stupor. Is it even possible?
I wanted to get the final array like this:
Array
(
[0] => Array
(
[0] => Apple
[1] => big
[price_item] => 70
[image_item] => img/apple45645.jpg
)
[1] => Array
(
[0] => Orange
[1] => medium
[price_item] => 90
[image_item] => img/ORANGE777.jpg
)
[2] => Array
(
[0] => Orange
[1] => big
[price_item] => 90
[image_item] => img/ORANGE777.jpg
)
)