Is there anyway to compare arrays in php using an inbuilt function, short of doing some sort of loop?
$a1 = array(1,2,3); $a2 = array(1,2,3); if (array_are_
verify that the intersections count is the same as both source arrays
$intersections = array_intersect($a1, $a2); $equality = (count($a1) == count($a2)) && (count($a2) == count($intersections)) ? true : false;