Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- if string contains .


webfoo - 9:58 pm on Dec 16, 2010 (gmt 0)


Hello all, it's been a while, but I am back cracking at some code.

What I need it to do is this: If $string contains a certain phrase, do one thing. If $string does not contain that phrase, do something else.

This is the code that is not working:
if(strpos($string,"phrase")!="false") {
// DO SOMETHING;
}
else {
// DO SOMETHING ELSE;
}

I am sure its something stupid. What is the problem?


Thread source:: http://www.webmasterworld.com/php/4243343.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com