On Tue, Mar 09, 2004 at 05:22:37PM -0000, Benjamin Jeeves wrote:
> Hi All 
> 
> I have two array one with a list of items in it. Then a second array with a list of 
> items in it what I want to be able to do is compare array1 to array2 and if a match 
> is found in both arrays delete that match from array1 and then so now? Any help 
> would be good.
> 
> so array1 = (1,2,3,4,5)
> array2 = (1,3,5)
> 
> then print array1 and the output be 2,4

$array1 = array_diff($array1, $array2);

- rob

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

Reply via email to