pgerzson Fri Jan 4 19:06:15 2002 EDT Modified files: /phpdoc/en/functions array.xml Log: re-insert commas into 'See also' cross reference section
Index: phpdoc/en/functions/array.xml diff -u phpdoc/en/functions/array.xml:1.149 phpdoc/en/functions/array.xml:1.150 --- phpdoc/en/functions/array.xml:1.149 Fri Jan 4 09:45:23 2002 +++ phpdoc/en/functions/array.xml Fri Jan 4 19:06:15 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.149 $ --> +<!-- $Revision: 1.150 $ --> <reference id="ref.array"> <title>Array Functions</title> <titleabbrev>Arrays</titleabbrev> @@ -21,8 +21,8 @@ implemented and used in PHP. </para> <para> - See also <function>is_array</function>, <function>explode</function>, - <function>implode</function>, <function>split</function> + See also <function>is_array</function>, <function>explode</function>, + <function>implode</function>, <function>split</function>, and <function>join</function>. </para> </partintro> @@ -39,7 +39,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>array</function></funcdef> - <paramdef>mixed + <paramdef>mixed <parameter><optional>...</optional></parameter> </paramdef> </funcprototype> @@ -92,10 +92,10 @@ ]]> </programlisting> <para> - will display : + will display : <screen role="php"> <![CDATA[ -Array +Array ( [0] => 1 [1] => 1 @@ -111,7 +111,7 @@ </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. + is 9, since biggest index was 8. </para> <para> This example creates a 1-based array. @@ -124,10 +124,10 @@ ]]> </programlisting> <para> - will display : + will display : <screen> <![CDATA[ -Array +Array ( [1] => 'January' [2] => 'February' @@ -140,7 +140,7 @@ </para> <para> See also <function>array_pad</function>, - <function>list</function> and<function>range</function>. + <function>list</function>, and <function>range</function>. </para> </refsect1> </refentry> @@ -308,7 +308,7 @@ <programlisting role="php"> <![CDATA[ $array = array (1, "hello", 1, "world", "hello"); -print_r(array_count_values ($array)); +print_r(array_count_values ($array)); ]]> </programlisting> <para> @@ -324,7 +324,7 @@ ]]> </screen> </para> - </example> + </example> </para> </refsect1> </refentry> @@ -363,15 +363,15 @@ ]]> </programlisting> </example> - </para> + </para> <para> - This makes <varname>$result</varname> have + This makes <varname>$result</varname> have <literal>array ("blue");</literal>. Multiple occurences in $array1 are all treated the same way. </para> <note> <simpara> - Two elements are considered equal if and only if + Two elements are considered equal if and only if <literal>(string) $elem1 === (string) $elem2</literal>. In words: when the string representation is the same. <!-- TODO: example of it... --> @@ -402,7 +402,7 @@ <funcprototype> <funcdef>array <function>array_filter</function></funcdef> <paramdef>array <parameter>input</parameter></paramdef> - <paramdef>mixed + <paramdef>mixed <parameter><optional>callback</optional></parameter> </paramdef> </funcprototype> @@ -411,7 +411,7 @@ <function>array_filter</function> returns an array containing all the elements of <parameter>input</parameter> filtered according a callback function. If the - <parameter>input</parameter> is an associative array + <parameter>input</parameter> is an associative array the keys are preserved. </para> <para> @@ -424,7 +424,7 @@ } function even($var) { - return ($var % 2 == 0); + return ($var % 2 == 0); } $array1 = array ("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); @@ -459,10 +459,10 @@ </screen> </para> </example> - </para> + </para> ¬e.func-callback; <para> - See also <function>array_map</function>, and + See also <function>array_map</function> and <function>array_reduce</function>. </para> </refsect1> @@ -495,7 +495,7 @@ </para> <para> If a value has several occurences, the latest key will be - used as its values, and all others will be lost. + used as its values, and all others will be lost. </para> <para> <function>array_flip</function> returns &false; @@ -555,9 +555,9 @@ </funcprototype> </funcsynopsis> <para> - <function>array_fill</function> fills an array with - <parameter>num</parameter> entries of the value of the - <parameter>value</parameter> parameter, keys starting at the + <function>array_fill</function> fills an array with + <parameter>num</parameter> entries of the value of the + <parameter>value</parameter> parameter, keys starting at the <parameter>start_index</parameter> parameter. </para> <para> @@ -584,7 +584,7 @@ ]]> </screen> </para> - </example> + </example> </para> </refsect1> </refentry> @@ -623,7 +623,7 @@ ]]> </programlisting> <para> - This makes <varname>$result</varname> have + This makes <varname>$result</varname> have <screen role="php"> <![CDATA[ Array @@ -635,10 +635,10 @@ </screen> </para> </example> - </para> + </para> <note> <simpara> - Two elements are considered equal if and only if + Two elements are considered equal if and only if <literal>(string) $elem1 === (string) $elem2</literal>. In words: when the string representation is the same. <!-- TODO: example of it... --> @@ -885,7 +885,7 @@ <screen> <![CDATA[ // printout of $c -Array +Array ( [0] => The number 1 is called uno in Spanish [1] => The number 2 is called dos in Spanish @@ -895,7 +895,7 @@ ) // printout of $d -Array +Array ( [0] => Array ( @@ -1031,8 +1031,8 @@ </para> <para> If the input arrays have the same string keys, then the later - value for that key will overwrite the previous one. If, however, - the arrays have the same numeric key, the later value will not + value for that key will overwrite the previous one. If, however, + the arrays have the same numeric key, the later value will not overwrite the original value, but will be appended. </para> <para> @@ -1240,7 +1240,7 @@ <programlisting role="php"> <![CDATA[ $ar = array (array ("10", 100, 100, "a"), array (1, 3, "2", 1)); -array_multisort ($ar[0], SORT_ASC, SORT_STRING, +array_multisort ($ar[0], SORT_ASC, SORT_STRING, $ar[1], SORT_NUMERIC, SORT_DESC); ]]> </programlisting> @@ -1321,8 +1321,8 @@ <para> <function>array_pop</function> pops and returns the last value of the <parameter>array</parameter>, shortening the - <parameter>array</parameter> by one element. - If <parameter>array</parameter> is empty (or is not an array), + <parameter>array</parameter> by one element. + If <parameter>array</parameter> is empty (or is not an array), &null; will be returned. </para> <para> @@ -1346,7 +1346,7 @@ ) ]]> </screen> - and <literal>rasberry</literal> will be assigned to + and <literal>rasberry</literal> will be assigned to <varname>$fruit</varname>. </para> </example> @@ -1405,8 +1405,8 @@ ]]> </programlisting> <para> - This example would result in <varname>$stack</varname> having - the following elements: + This example would result in <varname>$stack</varname> having + the following elements: <screen role="php"> <![CDATA[ Array @@ -1480,7 +1480,7 @@ </para> </refsect1> </refentry> - + <refentry id="function.array-reverse"> <refnamediv> <refname>array_reverse</refname> @@ -1494,7 +1494,7 @@ <funcprototype> <funcdef>array <function>array_reverse</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> - <paramdef>bool + <paramdef>bool <parameter><optional>preserve_keys</optional></parameter> </paramdef> </funcprototype> @@ -1518,7 +1518,7 @@ <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 + note the difference between the keys. The printout of <varname>$result</varname> and <varname>$result_keyed</varname> will be: <screen role="php"> @@ -1618,7 +1618,7 @@ <varname>$d</varname> containing <literal>1</literal>. </para> <para> - See also <function>array_filter</function>, and + See also <function>array_filter</function> and <function>array_map</function>. </para> </refsect1> @@ -1667,14 +1667,14 @@ ) ]]> </screen> - and <literal>orange</literal> will be assigned to + and <literal>orange</literal> will be assigned to <varname>$fruit</varname>. </para> </example> </para> <para> See also <function>array_unshift</function>, - <function>array_push</function> and + <function>array_push</function>, and <function>array_pop</function>. </para> </refsect1> @@ -1727,17 +1727,17 @@ <![CDATA[ $input = array ("a", "b", "c", "d", "e"); -$output = array_slice ($input, 2); // returns "c", "d" and "e" +$output = array_slice ($input, 2); // returns "c", "d", and "e" $output = array_slice ($input, 2, -1); // returns "c", "d" $output = array_slice ($input, -2, 1); // returns "d" -$output = array_slice ($input, 0, 3); // returns "a", "b" and "c" +$output = array_slice ($input, 0, 3); // returns "a", "b", and "c" ]]> </programlisting> </example> </para> <para> See also <function>array_splice</function>. - </para> + </para> </refsect1> </refentry> @@ -1809,7 +1809,7 @@ The following equivalences hold: <programlisting role="php"> <![CDATA[ -array_push ($input, $x, $y) array_splice ($input, count ($input), 0, +array_push ($input, $x, $y) array_splice ($input, count ($input), 0, array ($x, $y)) array_pop ($input) array_splice ($input, -1) array_shift ($input) array_splice ($input, 0, 1) @@ -1827,20 +1827,20 @@ <programlisting role="php"> <![CDATA[ $input = array ("red", "green", "blue", "yellow"); -array_splice ($input, 2); +array_splice ($input, 2); // $input is now array ("red", "green") $input = array ("red", "green", "blue", "yellow"); -array_splice ($input, 1, -1); +array_splice ($input, 1, -1); // $input is now array ("red", "yellow") $input = array ("red", "green", "blue", "yellow"); -array_splice ($input, 1, count($input), "orange"); +array_splice ($input, 1, count($input), "orange"); // $input is now array ("red", "orange") $input = array ("red", "green", "blue", "yellow"); -array_splice ($input, -1, 1, array("black", "maroon")); -// $input is now array ("red", "green", +array_splice ($input, -1, 1, array("black", "maroon")); +// $input is now array ("red", "green", // "blue", "black", "maroon") ]]> </programlisting> @@ -1851,12 +1851,12 @@ </para> </refsect1> </refentry> - + <refentry id="function.array-sum"> <refnamediv> <refname>array_sum</refname> <refpurpose> - Calculate the sum of values in an array. + Calculate the sum of values in an array. </refpurpose> </refnamediv> <refsect1> @@ -1925,14 +1925,14 @@ </para> <para> Note that keys are preserved. <function>array_unique</function> sorts - the values treated as string at first, then will keep the first key + the values treated as string at first, then will keep the first key encountered for every value, and ignore all following keys. It does not - mean that the key of the first related value from the unsorted + mean that the key of the first related value from the unsorted <parameter>array</parameter> will be kept. </para> <note> <simpara> - Two elements are considered equal if and only if + Two elements are considered equal if and only if <literal>(string) $elem1 === (string) $elem2</literal>. In words: when the string representation is the same. <!-- TODO: example of it... --> @@ -2059,7 +2059,7 @@ </para> <para> See also <function>array_shift</function>, - <function>array_push</function> and + <function>array_push</function>, and <function>array_pop</function>. </para> </refsect1> @@ -2148,18 +2148,18 @@ <funcdef>int <function>array_walk</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> <paramdef>string <parameter>func</parameter></paramdef> - <paramdef>mixed + <paramdef>mixed <parameter><optional>userdata</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <simpara> - Applies the user-defined function named by <parameter>func</parameter> + Applies the user-defined function named by <parameter>func</parameter> to each element of <parameter>array</parameter>. <parameter>func</parameter> will be passed array value as the first parameter and array key as the second parameter. If <parameter>userdata</parameter> is supplied, it will be passed as - the third parameter to the user function. <parameter>func</parameter> + the third parameter to the user function. <parameter>func</parameter> must be a user-defined function, and can't be a native PHP function. Thus, you can't use <function>array_walk</function> straight with <function>str2lower</function>, you must build a user-defined function @@ -2260,7 +2260,7 @@ <funcprototype> <funcdef>void <function>arsort</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> - <paramdef>int + <paramdef>int <parameter><optional>sort_flags</optional></parameter> </paramdef> </funcprototype> @@ -2301,12 +2301,12 @@ </para> <para> You may modify the behavior of the sort using the optional - parameter <parameter>sort_flags</parameter>, for details + parameter <parameter>sort_flags</parameter>, for details see <function>sort</function>. </para> <para> See also <function>asort</function>, <function>rsort</function>, - <function>ksort</function> and <function>sort</function>. + <function>ksort</function>, and <function>sort</function>. </para> </refsect1> </refentry> @@ -2322,7 +2322,7 @@ <funcprototype> <funcdef>void <function>asort</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> - <paramdef>int + <paramdef>int <parameter><optional>sort_flags</optional></parameter> </paramdef> </funcprototype> @@ -2363,12 +2363,12 @@ </para> <para> You may modify the behavior of the sort using the optional - parameter <parameter>sort_flags</parameter>, for details + parameter <parameter>sort_flags</parameter>, for details see <function>sort</function>. </para> <para> See also <function>arsort</function>, <function>rsort</function>, - <function>ksort</function> and <function>sort</function>. + <function>ksort</function>, and <function>sort</function>. </para> </refsect1> </refentry> @@ -2486,9 +2486,9 @@ <programlisting role="php"> <!-- TODO: examples about count(null), count(false), count(object).. --> <![CDATA[ -$a[0] = 1; -$a[1] = 3; -$a[2] = 5; +$a[0] = 1; +$a[1] = 3; +$a[2] = 5; $result = count ($a); // $result == 3 @@ -2503,7 +2503,7 @@ </para> <note> <para> - The <function>sizeof</function> function is an + The <function>sizeof</function> function is an <link linkend="aliases">alias</link> for <function>count</function>. </para> </note> @@ -2540,27 +2540,27 @@ internal pointer points beyond the end of the elements list, <function>current</function> returns &false;. <warning> - <para> + <para> If the array contains empty elements (0 or "", the empty - string) then this function will return &false; - for these elements as well. This makes it impossible to - determine if you are really at the end of the list in such - an array using <function>current</function>. To properly + string) then this function will return &false; + for these elements as well. This makes it impossible to + determine if you are really at the end of the list in such + an array using <function>current</function>. To properly traverse an array that may contain empty elements, use the - <function>each</function> function. + <function>each</function> function. </para> </warning> </para> <para> See also <function>end</function>, <function>next</function>, - <function>prev</function> and<function>reset</function>. + <function>prev</function>, and <function>reset</function>. </para> </refsect1> </refentry> <refentry id="function.each"> <refnamediv> - <refname>each</refname> + <refname>each</refname> <refpurpose> Return the current key and value pair from an array and advance the array cursor @@ -2587,7 +2587,7 @@ </para> <para> If the internal pointer for the array points past the end of the - array contents, <function>each</function> returns + array contents, <function>each</function> returns &false;. </para> <para> @@ -2630,7 +2630,7 @@ <para> <function>each</function> is typically used in conjunction with <function>list</function> to traverse an array; for instance, - <varname>$HTTP_POST_VARS</varname>: + <varname>$HTTP_POST_VARS</varname>: <example> <title> Traversing <varname>$HTTP_POST_VARS</varname> with @@ -2657,7 +2657,7 @@ <para> See also <function>key</function>, <function>list</function>, <function>current</function>, <function>reset</function>, - <function>next</function> and<function>prev</function>. + <function>next</function>, and <function>prev</function>. </para> </refsect1> </refentry> @@ -2683,8 +2683,8 @@ </para> <para> See also <function>current</function>, - <function>each</function>, - <function>next</function> and<function>reset</function>. + <function>each</function>, + <function>next</function>, and <function>reset</function>. </para> </refsect1> </refentry> @@ -2702,10 +2702,10 @@ <funcprototype> <funcdef>int <function>extract</function></funcdef> <paramdef>array <parameter>var_array</parameter></paramdef> - <paramdef>int + <paramdef>int <parameter><optional>extract_type</optional></parameter> </paramdef> - <paramdef>string + <paramdef>string <parameter><optional>prefix</optional></parameter> </paramdef> </funcprototype> @@ -2864,20 +2864,20 @@ <funcdef>bool <function>in_array</function></funcdef> <paramdef>mixed <parameter>needle</parameter></paramdef> <paramdef>array <parameter>haystack</parameter></paramdef> - <paramdef>bool + <paramdef>bool <parameter><optional>strict</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> Searches <parameter>haystack</parameter> for - <parameter>needle</parameter> and returns &true; + <parameter>needle</parameter> and returns &true; if it is found in the array, &false; otherwise. </para> <para> If the third parameter <parameter>strict</parameter> is set to &true; then the <function>in_array</function> - will also check the <link linkend="language.types">types</link> of + will also check the <link linkend="language.types">types</link> of the <parameter>needle</parameter> in the <parameter>haystack</parameter>. </para> <note> @@ -2951,7 +2951,7 @@ </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Description</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>array_search</function></funcdef> @@ -3012,7 +3012,7 @@ <funcprototype> <funcdef>int <function>krsort</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> - <paramdef>int + <paramdef>int <parameter><optional>sort_flags</optional></parameter> </paramdef> </funcprototype> @@ -3049,13 +3049,13 @@ </para> <para> You may modify the behavior of the sort using the optional - parameter <parameter>sort_flags</parameter>, for details + parameter <parameter>sort_flags</parameter>, for details see <function>sort</function>. </para> <simpara> See also <function>asort</function>, <function>arsort</function>, - <function>ksort</function>, <function>sort</function>, - <function>natsort</function> and <function>rsort</function>. + <function>ksort</function>, <function>sort</function>, + <function>natsort</function>, and <function>rsort</function>. </simpara> </refsect1> </refentry> @@ -3071,7 +3071,7 @@ <funcprototype> <funcdef>int <function>ksort</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> - <paramdef>int + <paramdef>int <parameter><optional>sort_flags</optional></parameter> </paramdef> </funcprototype> @@ -3104,16 +3104,16 @@ c = apple d = lemon ]]> - </screen> + </screen> </para> <para> You may modify the behavior of the sort using the optional - parameter <parameter>sort_flags</parameter>, for details + parameter <parameter>sort_flags</parameter>, for details see <function>sort</function>. </para> <simpara> - See also <function>asort</function>, <function>arsort</function>, - <function>sort</function>, <function>natsort</function> and + See also <function>asort</function>, <function>arsort</function>, + <function>sort</function>, <function>natsort</function>, and <function>rsort</function>. </simpara> <note> @@ -3204,7 +3204,7 @@ <programlisting role="php"> <![CDATA[ $array1 = $array2 = array ("img12.png", "img10.png", "img2.png", "img1.png"); - + sort($array1); echo "Standard sorting\n"; print_r($array1); @@ -3247,7 +3247,7 @@ </para> <para> See also <function>natcasesort</function>, - <function>strnatcmp</function> and + <function>strnatcmp</function>, and <function>strnatcasecmp</function>. </para> </refsect1> @@ -3287,7 +3287,7 @@ <para> See also <function>sort</function>, <function>natsort</function>, - <function>strnatcmp</function> and + <function>strnatcmp</function>, and <function>strnatcasecmp</function>. </para> </refsect1> @@ -3310,7 +3310,7 @@ </funcsynopsis> <para> Returns the array element in the next place that's pointed by the - internal array pointer, or &false; if + internal array pointer, or &false; if there are no more elements. </para> <para> @@ -3324,8 +3324,8 @@ <warning> <para> If the array contains empty elements, or elements that have a key - value of 0 then this function will return &false; - for these elements as well. To properly traverse an array which + value of 0 then this function will return &false; + for these elements as well. To properly traverse an array which may contain empty elements or elements with key values of 0 see the <function>each</function> function. </para> @@ -3334,7 +3334,7 @@ <para> See also <function>current</function>, <function>end</function>, - <function>prev</function> and<function>reset</function>. + <function>prev</function>, and <function>reset</function>. </para> </refsect1> </refentry> @@ -3353,13 +3353,13 @@ </funcprototype> </funcsynopsis> <simpara> - This is an <link linkend="aliases">alias</link> + This is an <link linkend="aliases">alias</link> for <function>current</function>. </simpara> <para> See also <function>end</function>, <function>next</function>, - <function>prev</function> and <function>reset</function>. + <function>prev</function>, and <function>reset</function>. </para> </refsect1> </refentry> @@ -3384,20 +3384,20 @@ <warning> <para> If the array contains empty elements then this function will - return &false; for these elements as well. + return &false; for these elements as well. To properly traverse an array which may contain empty elements see the <function>each</function> function. </para> </warning> </para> - <para> + <para> <function>prev</function> behaves just like <function>next</function>, except it rewinds the internal array pointer one place instead of advancing it. </para> <para> See also <function>current</function>, <function>end</function>, - <function>next</function> and<function>reset</function>. + <function>next</function>, and <function>reset</function>. </para> </refsect1> </refentry> @@ -3510,7 +3510,7 @@ <funcprototype> <funcdef>void <function>rsort</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> - <paramdef>int + <paramdef>int <parameter><optional>sort_flags</optional></parameter> </paramdef> </funcprototype> @@ -3549,13 +3549,13 @@ </para> <para> You may modify the behavior of the sort using the optional - parameter <parameter>sort_flags</parameter>, for details + parameter <parameter>sort_flags</parameter>, for details see <function>sort</function>. </para> <para> See also <function>arsort</function>, <function>asort</function>, <function>ksort</function>, - <function>sort</function> and<function>usort</function>. + <function>sort</function>, and <function>usort</function>. </para> </refsect1> </refentry> @@ -3594,7 +3594,7 @@ <para> See also <function>arsort</function>, <function>asort</function>, <function>ksort</function>, <function>rsort</function>, - <function>sort</function> and <function>usort</function>. + <function>sort</function>, and <function>usort</function>. </para> </refsect1> </refentry> @@ -3613,7 +3613,7 @@ </funcprototype> </funcsynopsis> <para> - The <function>sizeof</function> function is an + The <function>sizeof</function> function is an <link linkend="aliases">alias</link> for <function>count</function>. </para> <para> @@ -3633,7 +3633,7 @@ <funcprototype> <funcdef>void <function>sort</function></funcdef> <paramdef>array <parameter>array</parameter></paramdef> - <paramdef>int + <paramdef>int <parameter><optional>sort_flags</optional></parameter> </paramdef> </funcprototype> @@ -3653,7 +3653,7 @@ while (list ($key, $val) = each ($fruits)) { echo "fruits[".$key."] = ".$val."\n"; } - + ?> ]]> </programlisting> @@ -3742,9 +3742,9 @@ </note> ¬e.func-callback; <para> - See also <function>usort</function>, <function>uksort</function>, - <function>sort</function>, <function>asort</function>, - <function>arsort</function>, <function>ksort</function> + See also <function>usort</function>, <function>uksort</function>, + <function>sort</function>, <function>asort</function>, + <function>arsort</function>, <function>ksort</function>, and <function>rsort</function>. </para> </refsect1> @@ -3776,7 +3776,7 @@ <title><function>uksort</function> example</title> <programlisting role="php"> <![CDATA[ -function cmp ($a, $b) { +function cmp ($a, $b) { if ($a == $b) return 0; return ($a > $b) ? -1 : 1; } @@ -3806,10 +3806,10 @@ </para> ¬e.func-callback; <para> - See also <function>usort</function>, <function>uasort</function>, - <function>sort</function>, <function>asort</function>, + See also <function>usort</function>, <function>uasort</function>, + <function>sort</function>, <function>asort</function>, <function>arsort</function>, <function>ksort</function>, - <function>natsort</function> and <function>rsort</function>. + <function>natsort</function>, and <function>rsort</function>. </para> </refsect1> </refentry> @@ -3848,7 +3848,7 @@ <title><function>usort</function> example</title> <programlisting role="php"> <![CDATA[ -function cmp ($a, $b) { +function cmp ($a, $b) { if ($a == $b) return 0; return ($a > $b) ? -1 : 1; } @@ -3893,13 +3893,13 @@ <![CDATA[ function cmp ($a, $b) { return strcmp($a["fruit"], $b["fruit"]); -} +} $fruits[0]["fruit"] = "lemons"; $fruits[1]["fruit"] = "apples"; $fruits[2]["fruit"] = "grapes"; -usort($fruits, "cmp"); +usort($fruits, "cmp"); while (list ($key, $value) = each ($fruits)) { echo "\$fruits[$key]: " . $value["fruit"] . "\n"; @@ -3985,7 +3985,7 @@ <function>uksort</function>, <function>sort</function>, <function>asort</function>, <function>arsort</function>,<function>ksort</function>, - <function>natsort</function> and<function>rsort</function>. + <function>natsort</function>, and <function>rsort</function>. </para> </refsect1> </refentry>