#20766 [NEW]: array_search doesn't return value with array as needle

From: Date: Mon, 02 Dec 2002 18:41:23 +0000
Subject: #20766 [NEW]: array_search doesn't return value with array as needle
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26409@lists.php.net to get a copy of this message
From: francisf@videotron.ca Operating system: Linux 2.2.20 PHP version: 4.2.3 PHP Bug Type: Arrays related Bug description: array_search doesn't return value with array as needle $t1[] = "banana"; $t1[] = "orange"; $t1[] = "kiwi"; $t2[] = "car"; $t2[] = "kiwi"; $t2[] = "cat"; print "Kiwi key: ".array_search($t1,$t2); print "Car key: ".array_search("car",$t2); this code print: Kiwi key: Car key: 0 Should print: Kiwi key: 1 Car key: 0 Apache: 1.3.26 rh 6.2 -- Edit bug report at http://bugs.php.net/?id=20766&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20766&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20766&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20766&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20766&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20766&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20766&r=support Expected behavior: http://bugs.php.net/fix.php?id=20766&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20766&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20766&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20766&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20766&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20766&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20766&r=isapi

« previous php.bugs (#26409) next »