Remove foreach references outside <note>

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@241483 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2007-08-17 21:58:32 +00:00
parent e2bb697bbf
commit 16e60a2234

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.146 $ -->
<!-- $Revision: 1.147 $ -->
<chapter xml:id="language.control-structures" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Control Structures</title>
@ -549,13 +549,15 @@ foreach (array_expression as $key => $value)
array. Assuming the foreach loop runs to completion, the
array's internal pointer will be at the end of the array.
</para>
<para>
As of PHP 5, you can easily modify array's elements by preceding
<literal>$value</literal> with &amp;. This will assign
<link linkend="language.references">reference</link> instead of copying
the value.
<informalexample>
<programlisting role="php">
</note>
</para>
<para>
As of PHP 5, you can easily modify array's elements by preceding
<literal>$value</literal> with &amp;. This will assign
<link linkend="language.references">reference</link> instead of copying
the value.
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
$arr = array(1, 2, 3, 4);
@ -565,12 +567,10 @@ foreach ($arr as &$value) {
// $arr is now array(2, 4, 6, 8)
?>
]]>
</programlisting>
</informalexample>
This is possible only if iterated array can be referenced (i.e. is
variable).
</para>
</note>
</programlisting>
</informalexample>
This is possible only if iterated array can be referenced (i.e. is
variable).
</para>
<para>
<note>