PHP: is it possible to jump from one case to another inside a switch?

前端 未结 3 1314
迷失自我
迷失自我 2021-01-11 09:31

I have a switch where in very rare occasions I might need to jump to another case, I am looking for something like these:

switch($var){
 case: \'a\'
  if($ot         


        
3条回答
  •  悲&欢浪女
    2021-01-11 09:51

    How about cascading (or not) based on the extra condition?

    case 'x' :
        if ($otherVar == 0) {
            break;
        }
    case 'y' :
    

提交回复
热议问题