Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
Demonstrating array intersectCode Wizard, 12-30-2006 |
array_intersect() returns an array containing all the values of array1 that are present in all the arguments. Note that keys are preserved.
<?php
$array1 = array("OH","CA","NY","HI","CT");
$array2 = array("OH","CA","HI","NY","IA");
$array3 = array("TX","MD","NE","OH","HI");
$intersection = array_intersect($array1, $array2, $array3);
print_r($intersection);
// from "Beginning PHP 5 and MySQL: From Novice to Professional", courtesty apress.com
?>
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

