You can use: if ( ($var == 1) or ($var == 2) or ($var == 3)) { ... } ----- Original Message ----- From: "Dave Carrera" <[EMAIL PROTECTED]> To: "php List" <[EMAIL PROTECTED]> 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 > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php