note 120485 deleted from control-structures.break by peehaa
| From: | peehaa@php.net | Date: | Wed, 22 Feb 2017 09:38:03 +0000 |
| Subject: | note 120485 deleted from control-structures.break by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208803@lists.php.net to get a copy of this message | ||
Note Submitter: Paul Bichis
----
I've took never at mind dot com's example and made some changes:
- deleted } from the 8th row of code
- removed the space in front of 'world.' word and concatenated a new line.
<?php
echo 'Hello ';
foreach (array('1','2','3','4','5') as $id) {
echo $id . ' ';
if ($id == 3)
break;
}
echo 'world.'."\n";
?>