sort($array1); sort($array2); // now you can compare as usual if ($array1 == $array2) ...
如果要维护密钥,请使用asort().
asort()