I got 2 arrays:
$big_array = array (
array (
array (
\'correct\' => FALS
Edited above code check whether or the the arr1 is bigger or arr2 is bigger
function arrayRecursiveDiff($aArray1, $aArray2) {
if(sizeof($aArray1) > sizeof($aArray2))
{
$small_arr = $aArray2;
$big_arr = $aArray1;
$arr1_is_big = 1;
}
else
{
$small_arr= $aArray1;
$big_arr = $aArray2;
$arr1_is_big = 0;
}
$aReturn = array();
foreach ($big_arr as $mKey => $mValue) {
if (array_key_exists($mKey, $small_arr)) {
if (is_array($mValue)) {
$aRecursiveDiff = arrayRecursiveDiff($mValue, $small_arr[$mKey]);
if (count($aRecursiveDiff)) { $aReturn[$mKey] = $aRecursiveDiff; }
}
else {
if ($mValue != $small_arr[$mKey]) {
$aReturn[$mKey] = $mValue;
}
}
} else {
$aReturn[$mKey] = $mValue;
}
}
$aReturn["arr1_is_big"] = $arr1_is_big;
return ($aReturn);
}