Posted by Jesper on 03/31/06 18:05
I'm going to use a lot of searches for occurences of words in a long text:
$string = "a 500 character Text";
if (eregi("text", $string)) { print "found";}
Eregi should be very slow, so I'm looking for alternatives. Any suggestions?
I guess I could use something like
$string = strtolower($string);
if ( strpos($string, "text") !== false ) { print "found";}
Is that the best solution?
Navigation:
[Reply to this message]
|