RE: [PHP] IF statement question...
| From: | Ford, Mike [LSS] | Date: | Wed, 19 May 2004 12:08:09 +0000 |
| Subject: | RE: [PHP] IF statement question... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186526@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Tristan.Pretty@risk.sungard.com
> [mailto:Tristan.Pretty@risk.sungard.com]
> Sent: 19 May 2004 12:55
>
> Is it possible to request that a string CONTAINS another string...?
>
> EG:
> $string = "1, 2, 3, 7, 8, 9";
> if ($string CONTAINS "7") {
> // Do stuff
> }
if (strpos($string, "7")!==FALSE)
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds
Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211