I stuck on this and really don\'t know how to solve it. I have two multi-dimensional arrays and need to match every \"entry_id\" from second array with first one. Then need to c
This should work
foreach($array1 as $i) { foreach($array2 as $key=>$j) { if($j['entry_id'] == $i['entry_id']) { if($array2[$key]['status'] != $i['status']) { $j['status'] = array( $i['status'], $j['status'] // the new status ); } continue; } } }