CVS update: php3/doc/functions
| From: | rasmus | Date: | Sun, 01 Nov 1998 21:19:42 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2109@lists.php.net to get a copy of this message | ||
Date: Sunday November 1, 1998 @ 16:19
Author: rasmus
Update of /repository/php3/doc/functions
In directory asf:/u2/tmp/cvs-serv28539/doc/functions
Modified Files:
array.sgml
Log Message:
Add uasort() doc
Index: php3/doc/functions/array.sgml
diff -c php3/doc/functions/array.sgml:1.26 php3/doc/functions/array.sgml:1.27
*** php3/doc/functions/array.sgml:1.26 Mon Oct 26 10:22:38 1998
--- php3/doc/functions/array.sgml Sun Nov 1 16:19:42 1998
***************
*** 665,670 ****
--- 665,690 ----
</refsect1>
</refentry>
+ <refentry id="function.uasort">
+ <refnamediv>
+ <refname>uksort</refname>
+ <refpurpose>Sort an array with a user-defined comparison function and maintain index
association</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>void <function>uasort</function></funcdef>
+ <paramdef>array <parameter>array</parameter></paramdef>
+ <paramdef>function <parameter>cmp_function</parameter></paramdef>
+ </funcsynopsis>
+ <para>
+ This function sorts an array such that array indices maintain 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. The comparison function is user-defined.
+ </refsect1>
+ </refentry>
+
<refentry id="function.uksort">
<refnamediv>
<refname>uksort</refname>
***************
*** 683,689 ****
needs to be sorted by some non-trivial criteria, you should use
this function.
<example>
! <title><function>usort</function> example</title>
<programlisting>
function mycompare($a, $b) {
if ($a == $b) return 0;
--- 703,709 ----
needs to be sorted by some non-trivial criteria, you should use
this function.
<example>
! <title><function>uksort</function> example</title>
<programlisting>
function mycompare($a, $b) {
if ($a == $b) return 0;
***************
*** 703,709 ****
3: three
</computeroutput>
<para>
! See also <function>arsort</function>, <function>asort</function>,
<function>ksort</function>, <function>rsort</function> and
<function>sort</function>.
</refsect1>
</refentry>
--- 723,729 ----
3: three
</computeroutput>
<para>
! See also <function>arsort</function>, <function>asort</function>,
<function>uasort</function>,
<function>ksort</function>, <function>rsort</function> and
<function>sort</function>.
</refsect1>
</refentry>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net