note 3718 modified in in_array by ronabop

From: Date: Wed, 18 Oct 2000 05:12:30 +0000
Subject: note 3718 modified in in_array by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-6636@lists.php.net to get a copy of this message
in response to geebee@start.com.au's where's the needle 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/function.in-array.php

« previous php.notes (#6636) next »