Ver originalforeach($matrizA as $llaveA => $valorA){ foreach($matrizB as $llaveB => $valorB){ if($valorA != $valorB){ $matrizC[$llaveA] = 0; } }}