or use something like this: $array_values = array(1,2,3,4); if (in_array(user($arbitraryVariable), $array_values)) { // do your stuff }
Greets, Edward ----- Original Message ----- From: "Christoph Starkmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 15, 2002 4:11 PM Subject: RE: [PHP] multiple variables > Hi! > > > if(user($arbitraryVariable)==(1 or 2 or 3 or 4)) > > What would be the proper syntax for this? > > Here: > > if((user($arbitraryVariable) >= 1) and ($arbitraryVariable <= 4) and > ($arbitraryVariable == round($arbitraryVariable))) > > In other cases, you'd have to write > > if((user($arbitraryVariable)==1) or (user($arbitraryVariable)==2) or (...)) > > Cheers, > > Kiko > > ----- > It's not a bug, it's a feature. > christoph starkmann > mailto:[EMAIL PROTECTED] > http://www.fh-augsburg.de/~kiko > ICQ: 100601600 > ----- > > -- > 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