note 3718 modified in in_array by ronabop

From: Date: Wed, 21 Mar 2001 06:07:09 +0000
Subject: note 3718 modified in in_array by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-12613@lists.php.net to get a copy of this message
To find out where the needle is in the haystack, check out http://www.php.net/manual/function.each.php3 now you could do something like, $array = array("one", "two", "three", "etc"); while ($i = each($array)) { if ($i["value"] == "three") { echo "three was found in the haystack's element " , $i["key"]; } } http://www.php.net/manual/in-array.php

« previous php.notes (#12613) next »