// PHP code that returns array elements from array2 that are not present in array1 $array1 = array(1, 2); $array2 = array(1, 2, 3, 4); $result = array_diff($array2, array_intersect($array1, $array2)); /* // Result Array ( [2] => 3 [3] => 4 ) */ ?>
0 comments:
Post a Comment