Re: professional code quick tip
| From: | Robert Cummings | Date: | Tue, 20 Sep 2005 23:52:45 +0000 |
| Subject: | Re: professional code quick tip | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-222828@lists.php.net to get a copy of this message | ||
On Tue, 2005-09-20 at 19:47, Thorsten Suckow-Homberg wrote:
> You could use the following statement:
>
> <?php
> switch (true) {
> case (0 < $n <= 4):
> $f = 1;
> break;
> case (5 < $n <= 7):
> $f = 2;
> break;
> case (8 < $n <= 12):
> $f = 3;
> break;
> default:
> $f = 4;
> break;
> }
I'm certain that is illegal.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'