On Mon, 19 Feb 2001, Jason Greene wrote:
> Some of my thoughts:
> 1. if you change the return value of in_array to return the key, you can get a false
>error
> in your if statement, imagine if in_array found the element in key 0? : )
> 2. I would say that returning a key is a bit more useful then an option that does
>not reset the internal pointer or not, though I
> can see a use of it
>
> I do agree that having too many parameters is a bad thing, but if this is a concern
>what about making another function?
>
> There seems to be a large desire to see the key of in_array (see the haystack
>comment in docs)
We can change in_array() to return the the key if it's found, and false
if it's not, but imagine all the scripts it would break..
-Andrei
* The future is not what it used to be. *
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]