mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
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:
parent
a517e358f2
commit
60a90ca31e
1 changed files with 7 additions and 6 deletions
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue