I have two arrays of arrays that have an id key, and I\'d like to merge the data together based on that array\'s key and key value. The data would look somethin
id
Folllow this: array_replace_recursive() is recursive : it will recurse into arrays and apply the same process to the inner value.
$combined = array_replace_recursive($color, $size);
then you can print to see the result as bellow:
print_r($combined);