note 5828 modified in break by ronabop
| From: | ronabop@php.net | Date: | Fri, 18 Aug 2000 04:49:47 +0000 |
| Subject: | note 5828 modified in break by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2412@lists.php.net to get a copy of this message | ||
do {
for($i=0;$i<100;$i++) {
if(...something..) {
print $i;
break <val>;
}
}
// Do something to $j
} while ($j>0);
If <val> is set to 1, it will break out of the if and the for loop, <val> set to 2 will
break out of the do loop as well.
http://www.php.net/manual/control-structures.break.php