I need to know a search function. Basically something that'll allow me to see If x(a word) is a part of y(a string)
| SitePoint Sponsor |
I need to know a search function. Basically something that'll allow me to see If x(a word) is a part of y(a string)
Chris Beasley - I publish content and ecommerce sites.
Featured Article: Free Comprehensive SEO Guide
My Guide to Building a Successful Website
My Blog|My Webmaster Forums



try something like this
PHP Code:$text = "Hello World!";
if (eregi("World", $text)){
echo("Contains WORLD");
} else {
echo("Does not contain WORLD");
}
Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.
Exbabylon- Professional Internet Services





www.php.net/strstr (or stristr) is faster
- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy
Bookmarks