note 33385 added to control-structures.do.while
| From: | nightkin at msn dot com | Date: | Tue, 24 Jun 2003 16:15:57 +0000 |
| Subject: | note 33385 added to control-structures.do.while | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50948@lists.php.net to get a copy of this message | ||
You can use a "break n" statement to break within n cicles, so, if you have:
While (true) {
While (true) {
... code ...
break 2; // breaks out of both cycles
... code ...
break; // just breaks out of the inner cycle
... code ...
}
... code ...
break;
... code ...
}
That way you have no reason to use goto's, but if you still want to use them, be my guest...
----
Manual Page -- http://www.php.net/manual/en/control-structures.do.while.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33385
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33385&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33385&report=yes