mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
added short documentation for ioptional second sort() parameter
( see bug id #5867 ) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@29573 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fa036cb834
commit
b3e0db61d3
1 changed files with 60 additions and 0 deletions
|
@ -1086,6 +1086,7 @@ array_walk ($fruits, 'test_print');
|
|||
<funcprototype>
|
||||
<funcdef>void <function>arsort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1122,6 +1123,11 @@ fruits[c] = apple
|
|||
The fruits have been sorted in reverse alphabetical order, and
|
||||
the index associated with each element has been maintained.
|
||||
</para>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
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>.
|
||||
|
@ -1140,6 +1146,7 @@ fruits[c] = apple
|
|||
<funcprototype>
|
||||
<funcdef>void <function>asort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1176,6 +1183,11 @@ fruits[a] = orange
|
|||
The fruits have been sorted in alphabetical order, and the index
|
||||
associated with each element has been maintained.
|
||||
</para>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
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>.
|
||||
|
@ -1641,6 +1653,7 @@ if (in_array ("Irix", $os))
|
|||
<funcprototype>
|
||||
<funcdef>int <function>krsort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1671,6 +1684,11 @@ fruits[a] = orange
|
|||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
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>, and
|
||||
|
@ -1690,6 +1708,7 @@ fruits[a] = orange
|
|||
<funcprototype>
|
||||
<funcdef>int <function>ksort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1720,6 +1739,11 @@ fruits[d] = lemon
|
|||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
parameter <parameter>sort_flags</parameter>, for details
|
||||
see <function>sort</function>.
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>asort</function>, <function>arsort</function>,
|
||||
<function>sort</function>, and <function>rsort</function>.
|
||||
|
@ -1952,6 +1976,7 @@ while (list ($id, $name, $salary) = mysql_fetch_row ($result)) {
|
|||
<funcprototype>
|
||||
<funcdef>void <function>rsort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1984,6 +2009,11 @@ fruits[3] = apple
|
|||
<para>
|
||||
The fruits have been sorted in reverse alphabetical order.
|
||||
</para>
|
||||
<para>
|
||||
You may modify the behavior of the sort using the optional
|
||||
parameter <parameter>sort_flags</parameter>, for details
|
||||
see <function>sort</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>arsort</function>,
|
||||
<function>asort</function>, <function>ksort</function>,
|
||||
|
@ -2061,6 +2091,7 @@ while (list (, $number) = each ($numbers)) {
|
|||
<funcprototype>
|
||||
<funcdef>void <function>sort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -2093,6 +2124,35 @@ fruits[3] = orange
|
|||
</para>
|
||||
<para>
|
||||
The fruits have been sorted in alphabetical order.
|
||||
</para>
|
||||
<para>
|
||||
The optional second parameter <parameter>sort_flags</parameter>
|
||||
may be used to modify the sorting behavior using theese valies:
|
||||
</para>
|
||||
<para>
|
||||
Sorting order flags:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>SORT_ASC - sort in ascending order</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>SORT_DESC - sort in descending order</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Sorting type flags:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>SORT_REGULAR - compare items normally</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>SORT_NUMERIC - compare items numerically</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>SORT_STRING - compare items as strings</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>arsort</function>,
|
||||
|
|
Loading…
Reference in a new issue