note 90399 added to control-structures.foreach
| From: | Anonymous at osu1 dot php dot net | Date: | Mon, 20 Apr 2009 15:26:04 +0000 |
| Subject: | note 90399 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-153513@lists.php.net to get a copy of this message | ||
Just noticed that in the following example the loop will only be executed once:
foreach ($ary as $a);
{
echo $a;
}
notice the ";" at the end of line one
----
Server IP: 217.13.201.10
Probable Submitter: 134.176.85.142
----
Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php
Edit -- https://master.php.net/note/edit/90399
Del: integrated -- https://master.php.net/note/delete/90399/integrated
Del: useless -- https://master.php.net/note/delete/90399/useless
Del: bad code -- https://master.php.net/note/delete/90399/bad+code
Del: spam -- https://master.php.net/note/delete/90399/spam
Del: non-english -- https://master.php.net/note/delete/90399/non-english
Del: in docs -- https://master.php.net/note/delete/90399/in+docs
Del: other reasons-- https://master.php.net/note/delete/90399
Reject -- https://master.php.net/note/reject/90399
Search -- https://master.php.net/manage/user-notes.php