Re: array_diff()

From: Date: Wed, 01 Oct 2003 10:16:31 +0000
Subject: Re: array_diff()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164510@lists.php.net to get a copy of this message
On Wed, Oct 01, 2003 at 11:49:29AM +0200, Angelo Zanetti wrote: : : I looked at the PHP manual and it doesnt say much about this function. : what I want to know is that, do the 2 arrays have to have the same : length of number of elements? Nope. Re-examine Example 1: $array1 and $array2 are different sizes. http://www.php.net/manual/en/function.array-diff.php <?php $array1 = array("a" => "green", "red", "blue", "red"); $array2 = array("b" => "green", "yellow", "red"); $result = array_diff($array1, $array2); ?>

« previous php.general (#164510) next »