b_hole
02-04-2007, 08:09 AM
I'm trying to check if a specific word exists in a specific string. For that I'm using strpos function, like this:
if (strpos($str, $word)==0) // do something
But this statement returns true also when $word is the first word in $str. How can I workaround this problem?
Thanks.
if (strpos($str, $word)==0) // do something
But this statement returns true also when $word is the first word in $str. How can I workaround this problem?
Thanks.