I have two arrays $a and $b AND I am trying to create another array with mapping with id(array $a), a_id (array $b), where my output will looks like: I have tried by array map But this result is not my desire result. How can I map my 1st array with 2nd array related by $a[‘id’] = $b[‘a_id’]? Answer This
Tag: merging-data
Flip associative array and store new values in subarrays to prevent losing duplicated values
I have a flat associative array which may contain duplicate values. I need to restructure the data to store the original values as new keys and the original keys pushed into subarrays associated with the new keys. Answer