Forum Moderators: coopster

Message Too Old, No Replies

if statement help please if. == 2 or 3? possible?

I did this a while ago but i forget how i did it, its quite simple.

         

GamingLoft

11:33 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



K, i just need to find out how to write a it statement where the variable could be 2 values, or use a between.. that'd be awesome if anyone could help

eelixduppy

11:36 pm on Dec 3, 2007 (gmt 0)




if($var == 2 ¦¦ $var == 3)

or for a between:


if($var > 2 && $var < 3)

Note: Replace the ¦ character with the non-broken one.

GamingLoft

11:47 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



what exactly is the ¦ non broken?

NVM THIS I FOUND IT OUT!. sorry

[edited by: GamingLoft at 11:47 pm (utc) on Dec. 3, 2007]

eelixduppy

4:16 am on Dec 4, 2007 (gmt 0)



Yes, webmasterworld breaks these characters so you have to replace them. Glad you found out how :)