array_diff : array_diff « Data Structure « PHP





array_diff

 
<?php

$array1 = array("OH","CA","NY","HI","CT");
$array2 = array("OH","CA","HI","NY","IA");
$array3 = array("TX","MD","NE","OH","HI");
$diff = array_diff($array1, $array2, $array3);
print_r($intersection);

?>
  
  










Related examples in the same category

1.Array Complement
2.array_diff( ) function returns a new array containing all the values of array $arr1 that do not exist in array $arr2.