cvs: phpdoc /en/language/control-structures foreach.xml

From: Date: Tue, 21 Apr 2009 03:18:39 +0000
Subject: cvs: phpdoc /en/language/control-structures foreach.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3832@lists.php.net to get a copy of this message
fa Tue Apr 21 03:18:39 2009 UTC Modified files: /phpdoc/en/language/control-structures foreach.xml Log: fixed bug #47702 http://cvs.php.net/viewvc.cgi/phpdoc/en/language/control-structures/foreach.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/language/control-structures/foreach.xml diff -u phpdoc/en/language/control-structures/foreach.xml:1.1 phpdoc/en/language/control-structures/foreach.xml:1.2 --- phpdoc/en/language/control-structures/foreach.xml:1.1 Sat Dec 27 01:35:49 2008 +++ phpdoc/en/language/control-structures/foreach.xml Tue Apr 21 03:18:39 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 xml:id="control-structures.foreach" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title><literal>foreach</literal></title> @@ -79,7 +79,16 @@ </programlisting> </informalexample> This is possible only if iterated array can be referenced (i.e. is - variable). + variable), that means the following code won't work: + <programlisting role="php"> +<![CDATA[ +<?php +foreach (array(1, 2, 3, 4) as &$value) { + $value = $value * 2; +} + +?> +]]> </para> <warning> <para>

« previous php.doc.cvs (#3832) next »