note 44221 added to control-structures.continue
| From: | e at arix dot com | Date: | Sun, 18 Jul 2004 18:16:45 +0000 |
| Subject: | note 44221 added to control-structures.continue | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73566@lists.php.net to get a copy of this message | ||
one thing that isn't clear from the above docs is whether continuing returns control to the
incrementor in a for loop or to the evaluator i.e. the two statements below are equivalent:
for ($i = 0; $i < 3; $i++) your-code;
$i = 0;
while ($i < 3) {
your-code;
$i++;
}
so the question is: if your-code = continue, will $i++ ever run? the answer is yes.
----
Manual Page -- http://www.php.net/manual/en/control-structures.continue.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44221
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44221&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44221&report=yes
Search -- http://master.php.net/manage/user-notes.php