professional code quick tip

From: Date: Tue, 20 Sep 2005 23:20:02 +0000
Subject: professional code quick tip
Groups: php.general 
Request: Send a blank email to php-general+get-222823@lists.php.net to get a copy of this message
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.

« previous php.general (#222823) next »