#40082 [Opn->Csd]: array_search_keys returns a zero value element
| From: | iliaa@php.net | Date: | Tue, 09 Jan 2007 22:23:05 +0000 |
| Subject: | #40082 [Opn->Csd]: array_search_keys returns a zero value element | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107394@lists.php.net to get a copy of this message | ||
ID: 40082
Updated by: iliaa@php.net
Reported By: paulnamuag at yahoo dot com
-Status: Open
+Status: Closed
Bug Type: Arrays related
Operating System: Linux
PHP Version: 5.2.0
New Comment:
Seems to work fine in CVS.
Previous Comments:
------------------------------------------------------------------------
[2007-01-09 20:40:52] paulnamuag at yahoo dot com
Description:
------------
$array = array( "field1" => 0, "field2" => "This is a
string" );
$result = array_search( "This is a string", $array );
print_r( $result ); // Outputs "field1", not "field2"
Expected result:
----------------
$array = array( "field1" => 0, "field2" => "This is a
string" );
$result = array_search( "This is a string", $array );
print_r( $result ); // Outputs "field2"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40082&edit=1