simple: if ( '$foo = more that one expression ) { }
| From: | Asendorf, John | Date: | Wed, 23 Aug 2000 20:59:17 +0000 |
| Subject: | simple: if ( '$foo = more that one expression ) { } | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2080@lists.php.net to get a copy of this message | ||
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