<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
  <refentry id="function.uasort">
   <refnamediv>
    <refname>uasort</refname>
    <refpurpose>
     Sort an array with a user-defined comparison function and
     maintain index association
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>bool</type><methodname>uasort</methodname>
      <methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
      <methodparam><type>callback</type><parameter>cmp_function</parameter></methodparam>
     </methodsynopsis>
    <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.
    </para>
    <para>
     &return.success;
    </para>
    <note>
     <para>
      Please see <function>usort</function> and
      <function>uksort</function> for examples of user-defined
      comparison functions.
     </para>
    </note>
    <para>
     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>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->