svn: /phpdoc/en/trunk/reference/array/functions/ array-reverse.xml

From: Date: Wed, 14 Nov 2012 14:55:56 +0000
Subject: svn: /phpdoc/en/trunk/reference/array/functions/ array-reverse.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-10716@lists.php.net to get a copy of this message
krakjoe Wed, 14 Nov 2012 14:55:56 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=328357 Log: bug #63213 just requires a clear example Bug: https://bugs.php.net/63213 (Open) Error in documentation Changed paths: U phpdoc/en/trunk/reference/array/functions/array-reverse.xml Modified: phpdoc/en/trunk/reference/array/functions/array-reverse.xml =================================================================== --- phpdoc/en/trunk/reference/array/functions/array-reverse.xml 2012-11-14 14:53:12 UTC (rev 328356) +++ phpdoc/en/trunk/reference/array/functions/array-reverse.xml 2012-11-14 14:55:56 UTC (rev 328357) @@ -79,22 +79,33 @@ <![CDATA[ <?php $input = array("php", 4.0, array("green", "red")); -$result = array_reverse($input); -$result_keyed = array_reverse($input, true); +$reversed = array_reverse($input); +$preserved = array_reverse($input, true); + +print_r($input); +print_r($reversed); +print_r($preserved); ?> ]]> </programlisting> <para> - This makes both <varname>$result</varname> and - <varname>$result_keyed</varname> have the same elements, but - note the difference between the keys. The printout of - <varname>$result</varname> and - <varname>$result_keyed</varname> will be: + The output from the example will be: </para> <screen role="php"> <![CDATA[ Array ( + [0] => php + [1] => 4 + [2] => Array + ( + [0] => green + [1] => red + ) + +) +Array +( [0] => Array ( [0] => green

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