Re: Re: Switch - Case Statement Questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs <krebs.seb@xxxxxxxxx> wrote:
> Beside this it can be rewritten as
>
> switch ((int) (($count-1) / 7) {
>   case 0: // 1-7
>   case 1: // 8 - 14
>   default: // above 15
> }

Nice code refactoring :) Just a tad obscure for someone coming along
later, perhaps.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux