git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@210382 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Oliver Albers 2006-03-30 02:09:58 +00:00
parent 7a2bcc0af2
commit 29cf2d82f2

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.131 $ -->
<!-- $Revision: 1.132 $ -->
<chapter id="language.control-structures">
<title>Control Structures</title>
@ -411,7 +411,8 @@ for (expr1; expr2; expr3)
evaluated (executed).
</simpara>
<simpara>
Each of the expressions can be empty.
Each of the expressions can be empty, expr1 and expr3 may contain multiple
expressions separated by commas.
<varname>expr2</varname> being empty means the loop should
be run indefinitely (PHP implicitly considers it as
&true;, like C). This may not be as useless as
@ -456,7 +457,7 @@ for (; ; ) {
/* example 4 */
for ($i = 1; $i <= 10; print $i, $i++);
for ($i = 1, $j = 0; $i <= 10; $j += $i, print $i, $i++);
?>
]]>
</programlisting>