in a php switch statement is this legal (case without break) :
switch ($ext){ case 'gif': case 'png': case 'jpg': case 'tif': $img = 'images/icons/file/image.gif'; break; case 'zip': $img = 'images/icons/file/zip.gif'; break; }
Yes, I have done this before when validating user credentials against specific permission sets. You may want to consider tossing in a "default:" just in case something strange happens and done forget the "break;" once the condition is made.
An even quicker way of getting an answer to your question (that wouldn't have taken more than an hour) would have been to see what the manual says about the [man]switch[/man] statement. For example, the code example:
<?php switch ($i) { case 0: case 1: case 2: echo "i is less than 3 but not negative"; break; case 3: echo "i is 3"; } ?>