cvs: phpdoc /en/functions array.xml

From: Date: Sun, 18 Nov 2001 23:45:20 +0000
Subject: cvs: phpdoc /en/functions array.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969339013@lists.php.net to get a copy of this message
hholzgra Sun Nov 18 18:45:20 2001 EDT Modified files: /phpdoc/en/functions array.xml Log: reformated some of the examples to contain the expected output as <screen> within the <example> instead of adding a second <example> or <informalexample> with the results in a <programlisting> element Index: phpdoc/en/functions/array.xml diff -u phpdoc/en/functions/array.xml:1.123 phpdoc/en/functions/array.xml:1.124 --- phpdoc/en/functions/array.xml:1.123 Sat Nov 17 22:07:16 2001 +++ phpdoc/en/functions/array.xml Sun Nov 18 18:45:19 2001 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.123 $ --> +<!-- $Revision: 1.124 $ --> <reference id="ref.array"> <title>Array Functions</title> <titleabbrev>Arrays</titleabbrev> @@ -91,10 +91,9 @@ print_r($array); ]]> </programlisting> - </example> - which will display : - <informalexample> - <programlisting> + <para> + will display : + <screen role="php"> <![CDATA[ Array ( @@ -107,8 +106,9 @@ [9] => 19 ) ]]> - </programlisting> - </informalexample> + </screen> + </para> + </example> Note that index '3' is defined twice, and keep its final value of 13. Index 4 is defined after index 8, and next generated index (value 19) is 9, since biggest index was 8. @@ -123,10 +123,9 @@ print_r($firstquarter); ]]> </programlisting> - </example> - which will display : - <informalexample> - <programlisting> + <para> + will display : + <screen> <![CDATA[ Array ( @@ -135,8 +134,9 @@ [3] => 'March' ) ]]> - </programlisting> - </informalexample> + </screen> + </para> + </example> </para> <para> See also: <function>list</function>. @@ -169,19 +169,17 @@ <constant>CASE_LOWER</constant>. The function will leave number indices as is. </para> - <para> - <example> - <title><function>array_change_key_case</function> example</title> - <programlisting role="php"> + <example> + <title><function>array_change_key_case</function> example</title> + <programlisting role="php"> <![CDATA[ $input_array = array("FirSt" => 1, "SecOnd" => 4); print_r(array_change_key_case($input_array, CASE_UPPER); ]]> - </programlisting> - </example> - The printout of the above program will be: - <informalexample> - <programlisting> + </programlisting> + <para> + The printout of the above program will be: + <screen> <![CDATA[ Array ( @@ -189,9 +187,9 @@ [SECOND] => 2 ) ]]> - </programlisting> - </informalexample> - </para> + </screen> + </para> + </example> </refsect1> </refentry> @@ -225,20 +223,18 @@ indicies will be used in each resulting array with indices starting from zero. The default is &false;. </para> - <para> - <example> - <title><function>array_chunk</function> example</title> - <programlisting role="php"> + <example> + <title><function>array_chunk</function> example</title> + <programlisting role="php"> <![CDATA[ $input_array = array('a', 'b', 'c', 'd', 'e'); print_r(array_chunk($input_array, 2)); print_r(array_chunk($input_array, 2, TRUE)); ]]> - </programlisting> - </example> - The printout of the above program will be: - <informalexample> - <programlisting> + </programlisting> + <para> + The printout of the above program will be: + <screen> <![CDATA[ Array ( @@ -281,9 +277,9 @@ ) ]]> - </programlisting> - </informalexample> - </para> + </screen> + </para> + </example> </refsect1> </refentry> @@ -2004,9 +2000,10 @@ their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. - <example> - <title><function>arsort</function> example</title> - <programlisting role="php"> + </para> + <example> + <title><function>arsort</function> example</title> + <programlisting role="php"> <![CDATA[ $fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); arsort ($fruits); @@ -2015,24 +2012,19 @@ echo "$key = $val\n"; } ]]> - </programlisting> - </example> - </para> - <para> - This example would display: - </para> - <para> - <informalexample> - <programlisting> + </programlisting> + <para> + This example would display: + <screen> <![CDATA[ a = orange d = lemon b = banana c = apple ]]> - </programlisting> - </informalexample> - </para> + </screen> + </para> + </example> <para> The fruits have been sorted in reverse alphabetical order, and the index associated with each element has been maintained. @@ -2070,9 +2062,10 @@ their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. - <example> - <title><function>asort</function> example</title> - <programlisting role="php"> + </para> + <example> + <title><function>asort</function> example</title> + <programlisting role="php"> <![CDATA[ $fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); asort ($fruits); @@ -2081,24 +2074,19 @@ echo "$key = $val\n"; } ]]> - </programlisting> - </example> - </para> - <para> - This example would display: - </para> - <para> - <informalexample> - <programlisting> + </programlisting> + <para> + This example would display: + <screen> <![CDATA[ c = apple b = banana d = lemon a = orange ]]> - </programlisting> - </informalexample> - </para> + </screen> + </para> + </example> <para> The fruits have been sorted in alphabetical order, and the index associated with each element has been maintained.

« previous php.doc (#969339013) next »