Re: Newbie Logical opertaor question

From: Date: Thu, 11 Jul 2002 13:32:15 +0000
Subject: Re: Newbie Logical opertaor question
Groups: php.general 
Request: Send a blank email to php-general+get-107120@lists.php.net to get a copy of this message
Fixing the below, since it would produce a parse error (I forgot a parenthesis, hehe) Martin Clifford http://www.completesource.net (Now Open!) >>> "Martin Clifford" <MLC1@nrc.gov> 07/11/02 09:29AM >>> You'd have to separate it like so: if($var1 == 1 AND ($var2 == "a" OR $var2 == "b" OR $var2 == "c")) { // do stuff here if true } else { // do stuf here if false } HTH Martin Clifford http://www.completesource.net (Now Open!) >>> "Rw" <php@wiegmann.net> 07/11/02 09:11AM >>> I have been trying this to no avail. Tryng to say the equivalent of: IF (var1 = 1 AND var2 = "a" or "b" or "c") i.e. yield true if 1 and a OR 1 and b OR 1 and c :-) Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#107120) next »