When using array diff, if the last element and only the last element is
different it won't be returned as a difference.

<?
$ar = array("b" => 1, "blah" => 1);
$a1 = array("b" => 2, "blah" => 2);
var_dump(array_diff($ar, $a1));
?>
array(2) {
  ["b"]=>
  int(1)
  ["blah"]=>
  int(1)
}

<?
$ar = array("b" => 1, "blah" => 1);
$a1 = array("b" => 1, "blah" => 2);
var_dump(array_diff($ar, $a1));
?>
array(0) {
}


I can't look at this right now maybe I can later or tomarrow.


 - Brad


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to