| 
 Posted by adriano ghezzi on 09/21/05 02:20 
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.
 
  
Navigation:
[Reply to this message] 
 |