note 9893 deleted from function.array-diff by irc-html

From: Date: Sat, 19 Jan 2002 20:57:57 +0000
Subject: note 9893 deleted from function.array-diff by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25445@lists.php.net to get a copy of this message
when you are comparing array1 = array ("blue", "red", "green", "yellow"); array2 = array ("blue", "orange", "white", "yellow", "black"); $result = array_diff($array2, $array1); you get back $result[0] = ""; $result[1] = "orange"; $result[2] = "white"; $result[3] = ""; $result[4] = "black"; odd huh.. and if you are depending on seeing if you got any thing back from both arrays.. then the best thing to do is to count($result); and go from there..

« previous php.notes (#25445) next »