note 52462 added to control-structures.continue
| From: | spirit at osu1 dot php dot net | Date: | Mon, 02 May 2005 16:29:34 +0000 |
| Subject: | note 52462 added to control-structures.continue | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88867@lists.php.net to get a copy of this message | ||
continue seems not to work with switch !
this exemple :
<?php
$i = 0;
switch($i) {
case 1 : echo 1 . '<br />'; continue;
case 2 : echo 2 . '<br />'; continue;
default : $i++; continue;
}
echo $i;
?>
return 1, the switch is called only once !
----
Manual Page -- http://www.php.net/manual/en/control-structures.continue.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52462
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52462&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52462&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52462&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52462&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52462&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52462&report=yes
Search -- http://master.php.net/manage/user-notes.php