ID: 20765 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 4.2.3 New Comment:
There is a warning in the docs, I'll quote it here: This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function. This comes from the &return.falseproblem; entity in the docs. Previous Comments: ------------------------------------------------------------------------ [2002-12-02 11:10:15] [EMAIL PROTECTED] array_search will return "THE POSITION of the NEEDLE" when a needle is found in an array and return "FALSE" when not found. The problem will occur when the NEEDLE is found to be at the first position of an array which will return a "0", a value that is equipvalent to "FALSE" though the NEEDLE has been successfully found. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20765&edit=1