Home  >  Article  >  Backend Development  >  php 回调函数中的 continue 报错

php 回调函数中的 continue 报错

WBOY
WBOYOriginal
2016-06-06 20:33:211491browse

回调函数功能:遇到是3的倍数,不输出

下面不用回调函数的代码正常执行:

<code>function number($n,$m=''){
    for($i=0;$i</code>

报错内容:: Cannot break/continue 1 level in xxx.php

回复内容:

回调函数功能:遇到是3的倍数,不输出

下面不用回调函数的代码正常执行:

<code>function number($n,$m=''){
    for($i=0;$i</code>

报错内容:: Cannot break/continue 1 level in xxx.php

continue;的上一层没循环当然跳不了啊

php是块作用域,你要跳出的话直接return

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn