Re: wanted: array_diff for more than values

From: Date: Fri, 08 Nov 2002 23:15:59 +0000
Subject: Re: wanted: array_diff for more than values
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-123507@lists.php.net to get a copy of this message
in case anyone cares, here is my solution so far, please comment if you feel the need. function myArrayDiff($thing1, $thing2) { $diff = array(); while (list($key, $val) = each($thing1)) { if ((string)$val !== (string)$thing2[$key]) $diff[$key] = $val; } return $diff; }

« previous php.general (#123507) next »