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