Re: How do I add multiple var to a if clause ?
| From: | George Lioumis | Date: | Thu, 21 Feb 2002 10:44:20 +0000 |
| Subject: | Re: How do I add multiple var to a if clause ? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17120@lists.php.net to get a copy of this message | ||
You can use:
if ( ($var == 1) or ($var == 2) or ($var == 3))
{
...
}
----- Original Message -----
From: "Dave Carrera" <dave@davecarrera.com>
To: "php List" <php-db@lists.php.net>
Sent: Thursday, February 21, 2002 12:40 PM
Subject: [PHP-DB] How do I add multiple var to a if clause ?
> Hi All
>
> If($var == 1,2,3){
> }
> This is wrong so what is the right way.
>
> I am try to find out a if var equals either 1 2 or 3 do something type
> thing but cant find answers anywhere
>
> Thanks in Advance
>
> Dave Carrera
> Php / MySql Development
> Web Design
> Site Marketing
> http://www.davecarrera.com
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>