[PHP-DEV] Suggestion for in_array

2001-04-20 Thread Thomas Deliduka

Perhaps having in_array return the index for the element that contains the
needle.

That would be very useful.
-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
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]




Re: [PHP-DEV] Suggestion for in_array

2001-04-20 Thread Chuck Hagenbuch

Quoting Thomas Deliduka [EMAIL PROTECTED]:

 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, [EMAIL PROTECTED]

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.

-- 
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]




Re: [PHP-DEV] Suggestion for in_array

2001-04-20 Thread Andrei Zmievski

See array_search() function.

On Fri, 20 Apr 2001, Thomas Deliduka wrote:
 Perhaps having in_array return the index for the element that contains the
 needle.
 
 That would be very useful.
 -- 
 
 Thomas Deliduka
 IT Manager
  -
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.com/
 
 
 
 -- 
 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]
 



-Andrei
* Non-volatile, random-access, analog memory store... a book. *

-- 
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]