Re: Can PHP do an "IF" for 5-20

From: Date: Thu, 14 Dec 2000 17:17: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-30320@lists.php.net to get a copy of this message
On [14 December 2000 11:17] (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? } } if ($number == '5 through 20') } { } do something } } Have you tried ? if ($number >= 5 && $number <= 20) { do sth } - Diogo Zulli ----------------------[ www.sphynx.com.br ]--------------------------- "Why Live on The Edge When You Can BASE Jump Off It"

« previous php.general (#30320) next »