Re: strpos error (I'm missing something obvious)

From: Date: Mon, 01 Oct 2007 21:41:13 +0000
Subject: Re: strpos error (I'm missing something obvious)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-262624@lists.php.net to get a copy of this message
Kevin, I think I addressed that in my last message, if a bit indirectly. strpos will never return a boolean true. It will only ever return either the integer where the needle is found in the haystack, or false if said needle is not found in said haystack. Check the Return Values section at http://us.php.net/manual/en/function.strpos.php Regards, Carlton Whitehead Kevin Murphy wrote:
I fixed this by changing === TRUE to !== FALSE, so I think I am good to go now. But would still like to know why TRUE doesn't work. Thanks.


« previous php.general (#262624) next »