String Search???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Base
Forum Newbie
Posts: 13
Joined: Thu May 27, 2004 6:12 am

String Search???

Post by Base »

I need to code a search on a string and have it return a boolean value. For instance:

$string = "dog cat fish horse";
$result = stringsearchfunction('dog', $string);

Is there such a thing? I know there is a str_replace, but that doesn't return a boolean value.

Thanks!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

strstr, strpos
Post Reply