note 31465 deleted from function.in-array by didou

From: Date: Mon, 25 Aug 2003 18:37:33 +0000
Subject: note 31465 deleted from function.in-array by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55051@lists.php.net to get a copy of this message
Note Submitter: dpc453@DIESPAMDIE.myrealbox.com ---- Beware when comparing a STRING needle containing numbers to an INTEGER haystack. For example: in_array("2a7", array(2)); will return TRUE! (This is if the first number in the needle matches any of the integers in the haystack array.) I don't know if this is a bug or a feature, but can be very frustrating.

« previous php.notes (#55051) next »