note 80438 deleted from function.array-search by nlopess

From: Date: Fri, 25 Jan 2008 12:17:40 +0000
Subject: note 80438 deleted from function.array-search by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-135402@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- in response to lancelot--du-lac at hotmail dot fr If you want to check if a value exists in an array you should use the in_array function. This will return true or false. array_search has to return the key else you will be forced to loop through the entire array just to find a key.

« previous php.notes (#135402) next »