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

前端 未结 3 1339
迷失自我
迷失自我 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:42

    You need PHP 5.3 or higher, but here:

    Here is the goto functionality from http://php.net/manual/en/control-structures.goto.php

    
    

提交回复
热议问题