September 2001
Intermediate to advanced
768 pages
32h 45m
English
array array_intersect(array array_1, array array_2, [array ...])
| array_1 | First array to intersect |
| array_2 | Second array to intersect |
| ... | Further arrays to intersect |
Returns an array containing elements that are present in all array arguments.
Returns:
Array on success; NULL on failure
Description:
This function accepts at least two arrays as arguments, and returns an array containing all elements that appear in all given array arguments. The keys of the resultant array are those of the matching elements from the first array argument.
Version:
PHP 4 since 4.0.1
Example:
$array_1 = array('brown bat', 'fruit bat', 'wombat', 'baseball bat'); $array_2 = array('goatsucker', 'wombat', ... |
Read now
Unlock full access