professional code quick tip

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

 



hy guys this night I'm quite tired 

I need a little tip

 ok var n could be from 0 to 12

var f must be set 
f=1 if    0<n<=4
f=2 if   5<n<=7
f=3 if  8<n<=12
f=4 if n>12

due to my fatigue I coded four if-if else statement,

in other languages it is possible use conditional epression in switch case
like 
switch $n

case (0<n<=4):
........

but no in php

any suggestion for more professional coding then 4 if/else statement

tia

a.g.

-- 
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