eregi alternatives
- From: "Jesper" <j_esp-er@xxxxxxxxx>
- Date: Fri, 31 Mar 2006 17:05:24 +0200
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?
.
- Follow-Ups:
- Re: eregi alternatives
- From: Andrew Cameron
- Re: eregi alternatives
- Prev by Date: Re: imagecreatefromjpeg() uses too much memory
- Next by Date: Re: eregi alternatives
- Previous by thread: PHP query using WHERE with AND
- Next by thread: Re: eregi alternatives
- Index(es):