switch($device) {
case 'blackberry':
break;
case 'iphone':
case 'ipod':
case 'android':
do_something();
break;
}
As per the comment below I will elaborate a little bit.
The break statement breaks the execution of a switch statement and exits. So, if you had
case "iphone":
do_iphone();
case "ipod":
do_ipod();
break;
(note the missing break between two cases). Both do_iphone(); and do_ipod(); will execute (in order). So, basically what we are doing is a "hack" where the engine goes to the case iphone, and executes (nothing to execute in our original case) and moves ahead to ipod and so on.