if string contains...
| From: | Jamie Saunders | Date: | Sun, 06 May 2001 14:58:27 +0000 |
| Subject: | if string contains... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-51619@lists.php.net to get a copy of this message | ||
Hi,
I want to check whether a string contains a certain word e.g.
$varOne = "this is a string";
if ($varOne contains "is") {
return true;
} else {
return false;} Is there an operator for 'contains', if not how do you do this? Thanks. Jamie Saunders Mail: webprogramming@jamie-s.co.uk Web: http://jamie-s.co.uk