cvs: phpdoc /en/functions array.xml

From: Date: Tue, 23 Jan 2001 01:20:41 +0000
Subject: cvs: phpdoc /en/functions array.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969333845@lists.php.net to get a copy of this message
jimw Mon Jan 22 17:20:41 2001 EDT Modified files: /phpdoc/en/functions array.xml Log: document preserve_keys param to array_reverse Index: phpdoc/en/functions/array.xml diff -u phpdoc/en/functions/array.xml:1.52 phpdoc/en/functions/array.xml:1.53 --- phpdoc/en/functions/array.xml:1.52 Mon Jan 22 14:51:51 2001 +++ phpdoc/en/functions/array.xml Mon Jan 22 17:20:41 2001 @@ -751,12 +751,14 @@ <funcprototype> <funcdef>array <function>array_reverse</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> + <paramdef>bool <parameter><optional>preserve_keys</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> <function>Array_reverse</function> takes input <parameter>array</parameter> and returns a new array with the - order of the elements reversed. + order of the elements reversed, preserving the keys if + <parameter>preserve_keys</parameter> is true. </para> <para> <example> @@ -764,13 +766,21 @@ <programlisting role="php"> $input = array ("php", 4.0, array ("green", "red")); $result = array_reverse ($input); +$result_keyed = array_reverse ($input, true); </programlisting> </example> </para> <para> This makes <varname>$result</varname> have <literal>array - (array ("green", "red"), 4.0, "php")</literal>. + (array ("green", "red"), 4.0, "php")</literal>. But + <varname>$result2[0]</varname> is still + <literal>"php"</literal>. </para> + <note> + <para> + The second parameter was added in PHP 4.0.3. + </para> + </note> </refsect1> </refentry>

« previous php.doc (#969333845) next »