Re: [PHP] Best way to check for some certain text in a string

2002-08-21 Thread Tom Rogers
Hi, Wednesday, August 21, 2002, 11:22:36 PM, you wrote: JJ> I want to find a certain text in a string and i want it to return me a JJ> boolean. JJ> What is the best thing to do this? JJ> a) ereg("search for this", $string);// returns JJ> int(1) if true, bool(false) if

[PHP] Best way to check for some certain text in a string

2002-08-21 Thread José Jeria
I want to find a certain text in a string and i want it to return me a boolean. What is the best thing to do this? a) ereg("search for this", $string);// returns int(1) if true, bool(false) if not b) strpos($nav->userAgent, "search for this") > 0// gives me a boole