It's not so much "but" as "and"...

so

if ($answer > 0 && $answer <= 20) {  }

See the manual on logical operators


---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631

The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.


> -----Original Message-----
> From: Ben Cairns [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 8:47 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Less Than x but greater than y
> 
> 
> I am writing a script that adds a collection of variables and 
> then does 
> something depending on the answer....
> 
> Basically, I need the syntax for this:
> 
> <?
> if ($answer == 0) { ?> 0 <? }; ?>
> if ($answer >0 but <=20) { ?> more than 0 but less than or 
> equal to 20 <? }; 
> ?>
> 
> But, that doesn't seem to work, Can anyone help me with the syntax?
> 
> -- Ben Cairns - Head Of Technical Operations
> intasept.COM
> Tel: 01332 365333
> Fax: 01332 346010
> E-Mail: [EMAIL PROTECTED]
> Web: http://www.intasept.com
> 
> "MAKING sense of
> the INFORMATION
> TECHNOLOGY age
> @ WORK......"
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to