Re: Can PHP do an "IF" for 5-20
| From: | andre | Date: | Thu, 14 Dec 2000 17:15:44 +0000 |
| Subject: | Re: Can PHP do an "IF" for 5-20 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30319@lists.php.net to get a copy of this message | ||
hi
if (($number > 5) && ($number < 21)) {
do something
}
hope that helps
andreas
----- Original Message -----
From: "Robert Abbate" <cogea@ectisp.net>
To: <php-general@lists.php.net>
Sent: Thursday, December 14, 2000 6:17 PM
Subject: [PHP] Can PHP do an "IF" for 5-20
> Is there a way to do an "if" statement to include a series of numbers
> instead of matching just ONE? I know that you can use the "switch"
operator,
> but I have a great multitude of numbers. Is "switch" the only answer?
>
> Example:
>
> if ($number == '5 through 20')
> {
> do something
> }
>
> Thanks
> --
> Robert
>
>
>
> http://www.InternetSubmit.net
> Get Noticed! Submit your site to over 50,000 sites!
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>