On Tue, Aug 27, 2002 at 06:39:57AM -0700, Brad LaFountain wrote: > <? > $ar = array("b" => 1, "blah" => 1); > $a1 = array("b" => 1, "blah" => 2); > var_dump(array_diff($ar, $a1)); > ?> > array(0) { > }
I guess this may not be clear from documentation. array_diff() works with values. So it will return all values from first array that are not in the others. Since the value 1 is present in $a1, all elements of value 1 are removed from $ar in the returned array. Stig -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php