Reply to professional code quick tip

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация