Array_diff problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all.

I have two arrays and when compared against each other via array_diff, I do not get any output:

$myarray1 = Array ( 
[0] => Array ( [id] => 1 [Funding_Type] => Federal [Amount] => 10 [Frequency_Description] => Total [Other_Funding] => ) 
[1] => Array ( [id] => 2 [Funding_Type] => Trust [Amount] => 20 [Frequency_Description] => Per Year [Other_Funding] => ) 
[2] => Array ( [id] => 3 [Funding_Type] => Other Funding [Amount] => 30 [Frequency_Description] => Other [Other_Funding] => some )) 

$myarray2 = Array 
( 
[0] => Array ( [id] => 1 [Funding_Type] => Federal [Amount] => 10 [Frequency_Description] => Total [Other_Funding] => ) 
[1] => Array ( [id] => 2 [Funding_Type] => Trust [Amount] => 20 [Frequency_Description] => Per Year [Other_Funding] => ) 
[2] => Array ( [id] => 3 [Funding_Type] => Other Funding [Amount] => 50 [Frequency_Description] => Other [Other_Funding] => none )) 

$arraydifferences = (array_diff($myarray1,$myarray2));

I need $arraydifferences to record the differences between the two.

Any help is appreciated.

Thanks,
 
 --Rick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux