note 16693 added to function.array-search

From: Date: Fri, 09 Nov 2001 05:56:48 +0000
Subject: note 16693 added to function.array-search
Groups: php.notes 
Request: Send a blank email to php-notes+get-20628@lists.php.net to get a copy of this message
If you have an old version, you can use the following function as a substitute for the built-in array_search in 4.0.6. function array_search($needle, $haystackA) { if (in_array ($needle, $haystackA)) { foreach ($haystackA AS $key => $value) { if (ereg ($needle, $value)) { return $key; } } } else { return FALSE; } } -- http://www.php.net/manual/en/function.array-search.php http://master.php.net/manage/user-notes.php?action=edit+16693 http://master.php.net/manage/user-notes.php?action=delete+16693 http://master.php.net/manage/user-notes.php?action=reject+16693

« previous php.notes (#20628) next »