关于数组array_diff(array1, array2)求差集来比较数组是否相等的问题细究

2018-10-22
阅读 1 分钟
3.3k
<?php$array1 = array("a" => "green", "red", "blue", "red");$array2 = array("b" => "green", "yellow", "red");$result = array_diff($array1, $array2);print_r($result);?>