This question already has an answer here:
I'm trying solving a problem where i need to check if the arrays are same no matter how they are sorted i cannot use sorting because it add extra over head to time this function is taking in answering.
I am currently using array_diff_assoc
$arr1 = array(1,2,3);
$arr2 = array(3,2,1);
$result = array_diff_assoc($arr1,$arr2);
print_r($result);
Array ( [0] => 1 [2] => 3 ) But the above arrays are same!! The human way.
Any idea for comparing two arrays.
</div>