Re: PHP 4.0 Bug #9337 Updated: make in_array return key, if searched value was found

From: Date: Tue, 20 Feb 2001 14:52:53 +0000
Subject: Re: PHP 4.0 Bug #9337 Updated: make in_array return key, if searched value was found
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.dev 
Request: Send a blank email to php-dev+get-47065@lists.php.net to get a copy of this message
On Tue, 20 Feb 2001, Stig Venaas wrote: > I could in order to save the position do $key = key($arr). To > restore it later, I could then do something like array_setpos($key). > I'm not sure if the Zend API allows for setting the position without > looping through the array though. If array_setpos() is passed a non- > existing key it should return FALSE, else TRUE. I don't think Zend API allows that, but it's possible if you loop through it. > > What do you think? I wouldn't have a use for that function personally, but I can't say the same for others... -Andrei "The time from now until the completion of the project tends to become constant." -- Douglas Hartree

« previous php.dev (#47065) next »