I want to merge/combine 2 arrays based on the same key/value pair.
To be more clear, what I'm searching for is kind of a join function known in MySQL. The first array should be "joined" by the second one, based on the ID, which is the key/value pair 'name'.
How can I do this?
1. ARRAY
[0] => Array
(
[name] => first
[logo] => url
[cat] => abc
)
[1] => Array
(
[name] => second
[logo] => url
[cat] => abc
)
2. ARRAY
[0] => Array
(
[name] => first
[menu] => true
[key] => value
)
NEW ARRAY (Expexted Result):
[0] => Array
(
[name] => first
[logo] => url
[cat] => abc
[menu] => true
[key] => value
)
As you an see, it's quite self-explaining. In this case, the 'name' key is like an ID (for both arrays).