Is there a php function, similar to array_merge, that does the exact opposite? In other words, I have two arrays. I would like to remove any value that exists in the second
$array1 = array(1, 2, 3, 4, 5); $array2 = array(2, 4, 5); $result = array_diff($array1, $array2);