in-array function

From: Date: Tue, 25 Apr 2000 07:41:25 +0000
Subject: in-array function
Groups: php.version4 
Request: Send a blank email to php-version4+get-14042@lists.php.net to get a copy of this message
Hi, Any chance the in_array function can be modified to return the key instead of a boolean, perhaps if a third argument were added to ask for that info? Often I like to delete an entry from the array or do something else with it, or use it as a reverse lookup, and as is the function does not help very much. As long as we are on the topic, could it also be possible to pass a Regex as the needle? Ciao, Andreas

« previous php.version4 (#14042) next »