Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Computes the intersection of arrays

Tue Oct 28, 2008 1:40 am

Code:

<?php
   $array1
= array("OH" => "Ohio", "CA" => "California", "HI" => "Hawaii");
   
$array2 = array("50" => "Hawaii", "CA" => "California", "OH" => "Ohio");
   
$array3 = array("TX" => "Texas", "MD" => "Maryland", "OH" => "Ohio");
   
$intersection = array_intersect_assoc($array1, $array2, $array3);
   
print_r($intersection);
?>




Post a reply
  Related Posts  to : Computes the intersection of arrays
 can u check tis code to perform union & intersection of list     -  
 Arrays in java     -  
 Arrays using Pointers     -  
 Defining arrays in ASP     -  
 Arrays in photoshop     -  
 Multidimensional Arrays in JSP     -  
 Concept of arrays     -  
 creating arrays in java     -  
 Comparing Arrays in java     -  
 Get union of two arrays set and print it     -  

Topic Tags

PHP Arrays