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

Array difference for associate array

Tue Oct 28, 2008 1:18 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", "KS" => "Kansas");
   
$diff = array_diff_assoc($array1, $array2, $array3);
   
print_r($diff);
?>




Post a reply
  Related Posts  to : Array difference for associate array
 output associate array by print_r     -  
 compare an array with another array?     -  
 Array sort     -  
 Array shuffle     -  
 C++ array copying     -  
 array unshift     -  
 Array C++ Class     -  
 Here is how to display any 2d array     -  
 Imploding an Array     -  
 Get array chunk     -  

Topic Tags

PHP Arrays