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

From: Date: Mon, 19 Feb 2001 17:18:06 +0000
Subject: PHP 4.0 Bug #9337 Updated: make in_array return key, if searched value was found
Groups: php.dev 
Request: Send a blank email to php-dev+get-46927@lists.php.net to get a copy of this message
ID: 9337 Updated by: andre Reported By: sbergmann@php.net Old-Status: Open Status: Feedback Bug Type: Feature/Change Request Assigned To: Comments: maybe a fourth parameter switch to avoid 0->false problems? Previous Comments: --------------------------------------------------------------------------- [2001-02-19 11:18:18] sbergmann@php.net in_array() currently returns only true/false on whether or not a searched-for value is in a given array. I would like it to return the key of the array's element when value was found, and false otherwise. This should not break existing code using in_array(). --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9337&edit=2

« previous php.dev (#46927) next »