either.... if (($var <= 3)&&($var >= 1)){ } if you want it to just be somewhere between one and 3, or....
$my_array = array ("1", "2", "3"); if (in_array($variable, $my_array)) { } if you want it to be just one of those exact values. -----Original Message----- From: Dave Carrera [mailto:[EMAIL PROTECTED]] Sent: 21 February 2002 10:40 To: php List 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 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 08/02/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 08/02/02 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php