Re: Suggestion for in_array

From: Date: Fri, 20 Apr 2001 15:27:09 +0000
Subject: Re: Suggestion for in_array
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-52064@lists.php.net to get a copy of this message
Quoting Thomas Deliduka <thomas@neweve.com>: > Perhaps having in_array return the index for the element that contains the > needle. > > That would be very useful. No, that would break the semantics of the function, because the index could be 0, which evaluates to false in boolean expressions. -chuck -- Charles Hagenbuch, <chuck@horde.org> Taurus: You will receive an urgent transmission from the Martian government informing you that Mars does not, in fact, need women, so please stop sending them.

« previous php.dev (#52064) next »