RE: [PHP-WIN] simple: if ( '$foo = more that one expression ) { }
| From: | alain samoun | Date: | Wed, 23 Aug 2000 22:00:31 +0000 |
| Subject: | RE: [PHP-WIN] simple: if ( '$foo = more that one expression ) { } | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2085@lists.php.net to get a copy of this message | ||
if ( $foo == "north" OR $foo =="south" OR $foo =="west" OR $foo
=="mount"
echo $foo;
}
Message from Alain Samoun
alain@samoun.com
-----Original Message-----
From: Asendorf, John [mailto:JAsendorf@lcounty.com]
Sent: Wednesday, August 23, 2000 1:59 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] simple: if ( '$foo = more that one expression ) { }
I need to know if there is a way to is a way to compare a variable against
more than one condition...
if ( $foo = "north" OR "south" OR "west" OR "mount" ) { }
is there a way to do this? Or could I compare the variable against a
simple array of values looking for a match?
I want to do this so that I can check all the possible things I'm looking
for with one if statement then check each one specifically if any of them
show up...
Any help?
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer - http://www.lcounty.com
Licking County, Ohio, USA
740-349-3631
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net