continue 2 and break in switch statement

前端 未结 2 1691
[愿得一人]
[愿得一人] 2021-02-11 15:03

I am new to PHP and saw the code below online. It has continue 2 and break together in switch/case statement. What does it mean?



        
2条回答
  •  粉色の甜心
    2021-02-11 15:57

    continue accepts an optional numeric argument which tells it how many levels of enclosing loops it should skip to the end of. The default value is 1, thus skipping to the end of the current loop.

    Source: http://php.net/manual/en/control-structures.continue.php

提交回复
热议问题