Source Code:
(back to article)
<?php $array1 = [1, 2, 3, 4]; $array2 = [1, 2, 3, 4]; if (array_intersect($array1, $array2) == $array1) { echo "The arrays are equal."; } else { echo "The arrays are not equal."; }
Result:
Report an issue