Re: deleting array elements
| From: | Sven | Date: | Tue, 09 Mar 2004 17:42:14 +0000 |
| Subject: | Re: deleting array elements | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179912@lists.php.net to get a copy of this message | ||
Benjamin Jeeves schrieb:
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 Thank you hi,try array_diff() or array_intersect() or any other corresponding function. hth sven