Re: returning elements from array 1 not in array 2

From: Date: Tue, 01 Nov 2005 21:44:46 +0000
Subject: Re: returning elements from array 1 not in array 2
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-224916@lists.php.net to get a copy of this message
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));

« previous php.general (#224916) next »