note 94744 added to control-structures.break
| From: | TomRobinsontrobin5on at gk5y5tem5 dot com | Date: | Sat, 21 Nov 2009 19:02:17 +0000 |
| Subject: | note 94744 added to control-structures.break | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-163171@lists.php.net to get a copy of this message | ||
If you want to "break" out of an included file, and are not within a function, use the
return statement.
|| ...break doesn't work within included file...
|| include2.inc:
|| <?php
|| echo "$i";
|| break;
|| ?>
----
Server IP: 69.147.83.197
Probable Submitter: 64.251.74.14
----
Manual Page -- http://www.php.net/manual/en/control-structures.break.php
Edit -- https://master.php.net/note/edit/94744
Del: integrated -- https://master.php.net/note/delete/94744/integrated
Del: useless -- https://master.php.net/note/delete/94744/useless
Del: bad code -- https://master.php.net/note/delete/94744/bad+code
Del: spam -- https://master.php.net/note/delete/94744/spam
Del: non-english -- https://master.php.net/note/delete/94744/non-english
Del: in docs -- https://master.php.net/note/delete/94744/in+docs
Del: other reasons-- https://master.php.net/note/delete/94744
Reject -- https://master.php.net/note/reject/94744
Search -- https://master.php.net/manage/user-notes.php