Re: Can PHP do an "IF" for 5-20
| From: | Catalin Dragu | Date: | Thu, 14 Dec 2000 17:13:48 +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-30318@lists.php.net to get a copy of this message | ||
hi,
why don't you use:
if (($number>5 )and ($number<20))
good luck,
cata
Robert Abbate wrote:
> 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