note 102657 added to control-structures.continue
| From: | rjsteinert dot com at osu1 dot php dot net | Date: | Sun, 27 Feb 2011 05:22:18 +0000 |
| Subject: | note 102657 added to control-structures.continue | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177364@lists.php.net to get a copy of this message | ||
The most basic example that print "13", skipping over 2.
<?php
$arr = array(1, 2, 3);
foreach($arr as $number) {
if($number == 2) {
continue;
}
print $number;
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 71.169.136.100
----
Manual Page -- http://www.php.net/manual/en/control-structures.continue.php
Edit -- https://master.php.net/note/edit/102657
Del: integrated -- https://master.php.net/note/delete/102657/integrated
Del: useless -- https://master.php.net/note/delete/102657/useless
Del: bad code -- https://master.php.net/note/delete/102657/bad+code
Del: spam -- https://master.php.net/note/delete/102657/spam
Del: non-english -- https://master.php.net/note/delete/102657/non-english
Del: in docs -- https://master.php.net/note/delete/102657/in+docs
Del: other reasons-- https://master.php.net/note/delete/102657
Reject -- https://master.php.net/note/reject/102657
Search -- https://master.php.net/manage/user-notes.php