RE: [PHP-WIN] Less Than x but greater than y
| From: | Asendorf, John | Date: | Thu, 25 Jan 2001 13:48:20 +0000 |
| Subject: | RE: [PHP-WIN] Less Than x but greater than y | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5207@lists.php.net to get a copy of this message | ||
It's not so much "but" as "and"...
so
if ($answer > 0 && $answer <= 20) { }
See the manual on logical operators
---------------------
John Asendorf - jasendorf@lcounty.com
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:BenC@intasept.com]
> Sent: Thursday, January 25, 2001 8:47 AM
> To: php-windows@lists.php.net
> 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: BenC@intasept.com
> 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: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>