Results 1 to 8 of 8
May 8, 2012, 21:24 #1
- Join Date
- Jun 2008
- Rockford, IL
- 22 Post(s)
- 0 Thread(s)
SWITCH STATEMENT: check multiple conditions using AND operator?
I was curious if it was possible to have a 'compound case' (to send multiple variables to be compared) in a switch statement? Something along the lines of:
case ($var1 && !$var2):
case ($var2 && !$var1):
case ($var3 && ( $var1 ||$var2):
Tips for better/ faster SitePoint forum answers
Brilliant ideas, elegant execution.
Graphic Design, Art Direction, Copywriting and Web Design.