RE: [PHP] String. If contains
| From: | Vamsi Nath | Date: | Wed, 30 Aug 2000 09:13:59 +0000 |
| Subject: | RE: [PHP] String. If contains | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14354@lists.php.net to get a copy of this message | ||
Check out the strstr() function in the PHP manual.
--Vamsi
-----Original Message-----
From: Anders Dannberg [mailto:anders.dannberg@edk.se]
Sent: Wednesday, August 30, 2000 5:03 AM
To: php-general@lists.php.net
Subject: [PHP] String. If contains
Hello!
I need to know if a string contains a word (or character). What's the best
solution for this?
Please see below. This is what i need to know how to do....
$string = "It's a sunny morning in Sweden today!"
if ($string contains "sunny") {
echo "the string contained the
value "sunny";
}
Thanks in advance.
Anders
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net