stristr is another way www.php.net/stristr

Bastien

From: Justin Gruenberg <[EMAIL PROTECTED]>
Reply-To: Justin Gruenberg <[EMAIL PROTECTED]>
To: Ron Piggott <[EMAIL PROTECTED]>, php-db@lists.php.net
Subject: Re: [PHP-DB] That crazy IF command!
Date: Sun, 3 Apr 2005 15:05:30 -0500

On Apr 2, 2005 3:52 PM, Ron Piggott <[EMAIL PROTECTED]> wrote:
> Hey guys ... I am wondering if you have a varable named
>
> $query_holder="the big fat cow made lots of milk today";
>
> are you able to use the if command to see if the words "big fat" are part of
> that phrase?
>
> What would the syntax be?



Multiple ways.

if (stripos($query_holder, "big fat"))
http://us4.php.net/manual/en/function.stripos.php

That's one way.

Also... regular expressions..
http://us4.php.net/manual/en/function.eregi.php
http://us4.php.net/manual/en/function.preg-match.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to