note 49028 added to control-structures.continue
| From: | gregATlaundrymat dot tv at osu1 dot php dot net | Date: | Fri, 14 Jan 2005 16:58:30 +0000 |
| Subject: | note 49028 added to control-structures.continue | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83278@lists.php.net to get a copy of this message | ||
You using continue in a file included in a loop will produce an error. For example:
//page1.php
for($x=0;$x<10;$x++)
{
include('page2.php');
}
//page2.php
if($x==5)
continue;
else
print $x;
it should print
"012346789" no five, but it produces an error:
Cannot break/continue 1 level in etc.
----
Manual Page -- http://www.php.net/manual/en/control-structures.continue.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49028
Delete -- http://master.php.net/manage/user-notes.php?action=delete+49028&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49028&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+49028&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+49028&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+49028&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+49028&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49028&report=yes
Search -- http://master.php.net/manage/user-notes.php