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

php 回调函数中的 continue 报错

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:33:21
Original
1632 people have browsed it

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

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

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

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

回复内容:

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

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

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

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

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

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

Related labels:
php
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template