Conversation
Notices
-
!webdev is there a way to make multiple statements per case inside a switch statement? for example: case "x": $foo = 1, $bar = 2; #php
Wednesday, 01-Jul-09 14:41:19 UTC from web-
@wuha using "break"? http://is.gd/1k5Eg
-
@bestform: think that's not the point. I wanna declare several statements for ONE case. So eg. case "apple": $meat = 0, color = "red"
-
@wuha that's default behavior. stick as many statements in each block as you please.
-
@wuha i don't know about php but can't you use braces? like: case "x": {statement; statement;}
-