ID: 25909 Updated by: [EMAIL PROTECTED] Reported By: zygimantas at skylords dot com -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: RH7 PHP Version: 4.3.2 New Comment:
The function works properly when it returns 'false' as the haystack string does not contain string 'word3' in it. Hint: Array indices start from 0 (zero). Previous Comments: ------------------------------------------------------------------------ [2003-10-19 06:29:54] zygimantas at skylords dot com Description: ------------ strpos fails when array is used as needle. Reproduce code: --------------- $i = 2; $str_word = 'sentence with word2'; $arr_letters = array('word1', 'word2', 'word3'); echo strpos($str_word, $arr_letters[$i]); Expected result: ---------------- null ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25909&edit=1