if or else if
#3

It's like this:
PHP код:
else if 
isn't really meant to be used. Your first example is good. If you have 7 values for one variable and you want for each to do different thing you will use on each
PHP код:
if 
but if you want that 6 have same function and one different you will use for one
PHP код:
if 
and for the rest
PHP код:
else 
. So else is for all values that weren't previously used in if.
Reply


Messages In This Thread
if or else if - by ||123|| - 18.07.2011, 21:20
Re: if or else if - by ћNJ - 18.07.2011, 21:23
Re: if or else if - by [MG]Dimi - 18.07.2011, 21:32
Re: if or else if - by Pghpunkid - 18.07.2011, 21:35
Re: if or else if - by ||123|| - 18.07.2011, 21:49

Forum Jump:


Users browsing this thread: 1 Guest(s)