I solved it as follows:
<?php $arrayOld=array( '1'=>'32', '2'=>'34', '3'=>'36', '4'=>'38', '5'=>'40', '6'=>'42', '7'=>'44', ); $arrayNew=array( '2'=>'32', '1'=>'34', '3'=>'36', '4'=>'38', '5'=>'46', '6'=>'42', '7'=>'44', ); $result = array_diff($arrayNew,array_intersect_assoc($arrayOld, $arrayNew)); print_r($result);
/ ** We can see that the indices are different for values ββ32 and 34 * And the value of index 5 also changed from 40 to 46 * /
source share