reference/array/functions/asort.xml
2ca090342977839edca2f7f4e52305a1b5da6095
...
...
@@ -8,18 +8,23 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>bool</type><methodname>asort</methodname>
11
+
<type>true</type><methodname>asort</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 ascending order such that array indices maintain
17
-
their correlation with the array elements they are associated
18
-
with. This is used mainly when sorting associative arrays where
19
-
the actual element order is significant.
16
+
Sorts <parameter>array</parameter> in place in ascending order,
17
+
such that its keys maintain their correlation with the values they
18
+
are associated with.
19
+
</para>
20
+
<para>
21
+
This is used mainly when sorting associative arrays where the actual
22
+
element order is significant.
20
23
</para>
21
24
&note.sort-unstable;
25
+
&note.reset-index;
22
26
</refsect1>
27
+

23
28
<refsect1 role="parameters">
24
29
&reftitle.parameters;
25
30
<para>
...
...
@@ -36,12 +41,33 @@
36
41
</variablelist>
37
42
</para>
38
43
</refsect1>
44
+

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

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

45
71
<refsect1 role="examples">
46
72
&reftitle.examples;
47
73
<para>
...
...
@@ -74,15 +100,16 @@ a = orange
74
100
</example>
75
101
</para>
76
102
</refsect1>
103
+

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

86
113
</refentry>
87
114
<!-- Keep this comment at the end of the file
88
115
Local variables:
89
116