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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux