foreach($array1 as &$val1){ //Paso el array1 como referencia foreach ($array2 as $val2){ if($val1['email']==$val2['email']){ $val1['status']=$val2['status']; //Agrego al array1 el status } } } unset($val1); //Se elimina la referencia print_r($array1);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter