Re: returning elements from array 1 not in array 2

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

 



What is the function to remove all of
the elements from array 1 that are not in array 2 and return them.


Try: array_diff($arr1, array_intersect($arr1, $arr2));

--
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