Added foreach/endforeach as per errata.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32436 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ron Chmara 2000-09-11 03:57:23 +00:00
parent a517e358f2
commit 60a90ca31e

View file

@ -154,12 +154,13 @@ if ($a > $b) {
<title>Alternative syntax for control structures</title>
<para>
PHP offers an alternative syntax for some of its control
structures; namely, <literal>if</literal>,
<literal>while</literal>, <literal>for</literal>, and
<literal>switch</literal>. In each case, the basic form of the
alternate syntax is to change the opening brace to a colon (:) and
the closing brace to <literal>endif;</literal>,
<literal>endwhile;</literal>, <literal>endfor;</literal>, or
structures; namely, <literal>if</literal>,
<literal>while</literal>, <literal>for</literal>,
<literal>foreach</literal>, and <literal>switch</literal>.
In each case, the basic form of the alternate syntax is to change
the opening brace to a colon (:) and the closing brace to
<literal>endif;</literal>, <literal>endwhile;</literal>,
<literal>endfor;</literal>, <literal>endforeach;</literal>, or
<literal>endswitch;</literal>, respectively.
<informalexample>
<programlisting role="php">