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 using Pointers     -  
 Defining arrays in ASP     -  
 Arrays in photoshop     -  
 Multidimensional Arrays in JSP     -  
 Concept of arrays     -  
 Arrays in java     -  
 Variable Size Arrays     -  
 Multidimensional arrays in Java     -  
 How to compare two arrays in java     -  

Topic Tags

PHP Arrays