Re: Using Arrays in PHP hi,
array 1 match up to the correct values in array 2
array 1 array 2
1 4
2 1
3 3
4 5
5 2
<?php
$a1 = array(1, 2, 3, 4, 5);
$a2 = array(4, 1, 3, 5, 2);
var_dump(! (bool) array_diff($a1, $a2));
?>
Will print true if both arrays have the same values. |