reference/array/functions/arsort.xml
2ca090342977839edca2f7f4e52305a1b5da6095
...
...
@@ -8,19 +8,21 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>bool</type><methodname>arsort</methodname>
11
+
<type>true</type><methodname>arsort</methodname>
12
12
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
13
13
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
-
This function sorts an array in descending order such that array indices maintain their
17
-
correlation with the array elements they are associated with.
16
+
Sorts <parameter>array</parameter> in place in descending order,
17
+
such that its keys maintain their correlation with the values they
18
+
are associated with.
18
19
</para>
19
20
<para>
20
21
This is used mainly when sorting associative arrays where the actual
21
22
element order is significant.
22
23
</para>
23
24
&note.sort-unstable;
25
+
&note.reset-index;
24
26
</refsect1>
25
27
<refsect1 role="parameters">
26
28
&reftitle.parameters;
...
...
@@ -38,12 +40,33 @@
38
40
</variablelist>
39
41
</para>
40
42
</refsect1>
43
+

41
44
<refsect1 role="returnvalues">
42
45
&reftitle.returnvalues;
43
46
<para>
44
-
&return.success;
47
+
&return.true.always;
45
48
</para>
46
49
</refsect1>
50
+

51
+
<refsect1 role="changelog">
52
+
&reftitle.changelog;
53
+
<para>
54
+
<informaltable>
55
+
<tgroup cols="2">
56
+
<thead>
57
+
<row>
58
+
<entry>&Version;</entry>
59
+
<entry>&Description;</entry>
60
+
</row>
61
+
</thead>
62
+
<tbody>
63
+
&return.type.true;
64
+
</tbody>
65
+
</tgroup>
66
+
</informaltable>
67
+
</para>
68
+
</refsect1>
69
+

47
70
<refsect1 role="examples">
48
71
&reftitle.examples;
49
72
<para>
...
...
@@ -76,15 +99,16 @@ c = apple
76
99
</example>
77
100
</para>
78
101
</refsect1>
102
+

79
103
<refsect1 role="seealso">
80
104
&reftitle.seealso;
81
-
<para>
82
-
<simplelist>
83
-
<member><function>asort</function></member>
84
-
<member>&seealso.array.sorting;</member>
85
-
</simplelist>
86
-
</para>
105
+
<simplelist>
106
+
<member><function>sort</function></member>
107
+
<member><function>asort</function></member>
108
+
<member>&seealso.array.sorting;</member>
109
+
</simplelist>
87
110
</refsect1>
111
+

88
112
</refentry>
89
113
<!-- Keep this comment at the end of the file
90
114
Local variables:
91
115