File: array.sgml

package info (click to toggle)
php3 1%3A3.0.5-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,348 kB
  • ctags: 9,086
  • sloc: ansic: 76,362; sh: 2,333; php: 1,329; yacc: 1,148; makefile: 970; perl: 763; cpp: 529; awk: 90; sql: 11
file content (730 lines) | stat: -rw-r--r-- 22,772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730

 <reference id="ref.array">
  <title>Array Functions</title>
  <titleabbrev>Arrays</titleabbrev>

  <refentry id="function.array">
   <refnamediv>
    <refname>array</refname>
    <refpurpose>
     Create an array
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>array <function>array</function></funcdef>
     <varargs>
    </funcsynopsis>
    <para>
     Returns an array of the parameters.  The parameters can be given
     an index with the <literal>=&gt;</literal> operator.

    <para>
     Note that <function>array</function> really is a language
     construct used to represent literal arrays, and not a regular
     function.

    <para>
     The following example demonstrates how to create a
     two-dimensional array, how to specify keys for associative
     arrays, and how to skip-and-continue numeric indices in normal
     arrays.

     <example>
      <title><function>array</function> example</title>
      <programlisting>
$fruits = array(
    "fruits"  => array("a"=>"orange","b"=>"banana","c"=>"apple"),
    "numbers" => array(1, 2, 3, 4, 5, 6)
    "holes"   => array("first", 5 => "second", "third")
);
</programlisting></example>

    <para>
     See also:
     <function>list</function>.
   </refsect1>
  </refentry>


  <refentry id="function.array-walk">
   <refnamediv>
    <refname>array_walk</refname>
    <refpurpose>
     Apply a function to every member of an array.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>array_walk</function></funcdef>
     <paramdef>array <parameter>arr</parameter></paramdef>
     <paramdef>string <parameter>func</parameter></paramdef>
    </funcsynopsis>

    <simpara>
     Applies the function named by <parameter>func</parameter> to each
     element of <parameter>arr</parameter>. The elements are passed as
     the first argument of <parameter>func</parameter>; if
     <parameter>func</parameter> requires more than one argument, a
     warning will be generated each time
     <function>array_walk</function> calls
     <parameter>func</parameter>. These warnings may be suppressed by
     prepending the '@' sign to the <function>array_walk</function>
     call, or by using <function>error_reporting</function>.

    <para>
     Note that <parameter>func</parameter> will actually be working
     with the elements of <parameter>arr</parameter>, so any changes
     made to those elements will actually be made in the array itself.

    <para>
     <example>
      <title><function>array_walk</function> example</title>
      <programlisting>
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");

function test_alter( $item1 ) {
   $item1 = 'bogus';
}

function test_print( $item2 ) {
   echo "$item2&lt;br&gt;\n";
}

array_walk( $fruits, 'test_print' );
array_walk( $fruits, 'test_alter' );
array_walk( $fruits, 'test_print' );
      </programlisting>
     </example>

    <simpara>
     See also <function>each</function> and <function>list</function>.

   </refsect1>
  </refentry>



  <refentry id="function.arsort">
   <refnamediv>
    <refname>arsort</refname>
    <refpurpose>
     Sort an array in reverse order and maintain index association
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>arsort</function></funcdef>
     <paramdef>array <parameter>array</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.  
     <example>
      <title><function>arsort</function> example</title>
      <programlisting>
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
arsort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
    echo "fruits[$key] = ".$fruits[$key]."\n";
}
</programlisting></example>
     This example would display:
     <computeroutput>
fruits[a] = orange
fruits[d] = lemon
fruits[b] = banana
fruits[c] = apple
</computeroutput>
     The fruits have been sorted in reverse alphabetical order, and
     the index associated with each element has been maintained.
    <para>
     See also: <function>asort</function>, <function>rsort</function>,
     <function>ksort</function>, and <function>sort</function>.
   </refsect1>
  </refentry>

  <refentry id="function.asort">
   <refnamediv>
    <refname>asort</refname>
    <refpurpose>Sort an array and maintain index association</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>asort</function></funcdef>
     <paramdef>array <parameter>array</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.  
     <example>
      <title><function>asort</function> example</title>
      <programlisting>
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
asort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
    echo "fruits[$key] = ".$fruits[$key]."\n";
}
</programlisting></example>
     This example would display:
     <computeroutput>
fruits[c] = apple
fruits[b] = banana
fruits[d] = lemon
fruits[a] = orange
</computeroutput>
     The fruits have been sorted in alphabetical order, and the index
     associated with each element has been maintained.
    <para>
     See also <function>arsort</function>, <function>rsort</function>,
     <function>ksort</function>, and <function>sort</function>.
   </refsect1>
  </refentry>

  <refentry id="function.count">
   <refnamediv>
    <refname>count</refname>
    <refpurpose>count elements in a variable</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>count</function></funcdef>
     <paramdef>mixed <parameter>var</parameter></paramdef>
    </funcsynopsis>
    <para>
     Returns the number of elements in <parameter>var</parameter>, which is 
     typically an array (since anything else will have one element).
    <para>
     Returns 0 if the variable is not set.
    <para>
     Returns 1 if the variable is not an array.
    <para>
     See also:
     <function>sizeof</function>, <function>isset</function>, and
     <function>is_array</function>.
   </refsect1>
  </refentry>

  <refentry id="function.current">
   <refnamediv>
    <refname>current</refname>
    <refpurpose>return the current element in an array</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>mixed <function>current</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     Each array variable has an internal pointer that points to one of
     its elements.  In addition, all of the elements in the array are
     linked by a bidirectional linked list for traversing purposes.
     The internal pointer points to the first element that was inserted
     to the array until you run one of the functions that modify that
     pointer on that array.

    <para>
     The <function>current</function> function simply returns the
     array element that's currently being pointed by the internal
     pointer.  It does not move the pointer in any way.  If the
     internal pointer points beyond the end of the elements list,
     <function>current</function> returns false.

    <para> 
     <emphasis>Warning:</emphasis> if the array contains empty
     elements (0 or "", the empty string) then this function
     will return false for these elements as well. It is
     undecideable if the current element is just a zero-value or
     you have traversed beyond the end of the array. To properly
     traverse an array, use the <function>each</function>
     function.

    <para>
     See also:
     <function>end</function>, <function>next</function>,
     <function>prev</function> and <function>reset</function>.
   </refsect1>
  </refentry>


  <refentry id="function.each">
   <refnamediv>
    <refname>each</refname>
    <refpurpose>return next key/value pair from an array</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>array <function>each</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     Returns the current key/value pair from the array
     <parameter>array</parameter> and advances the array cursor. This 
	 pair is returned in a four-element array, with the keys 
	 <emphasis>0</emphasis>,
     <emphasis>1</emphasis>, <emphasis>key</emphasis>, and
     <emphasis>value</emphasis>. Elements <emphasis>0</emphasis> and
     <emphasis>key</emphasis> each contain the key name of the array
     element, and <emphasis>1</emphasis> and
     <emphasis>value</emphasis> contain the data.
     
    <para>
     <example>
      <title>each() examples</title>
      <programlisting>
$foo = array( "bob", "fred", "jussi", "jouni" );
$bar = each( $foo );
      </programlisting>

      <para>
       <literal>$bar</literal> now contains the following key/value
       pairs:
       
       <itemizedlist spacing="compact">
        <listitem><simpara>0 => 0
        <listitem><simpara>1 => 'bob'
        <listitem><simpara>key => 0
        <listitem><simpara>value => 'bob'
       </itemizedlist>

       <programlisting>
$foo = array( "Robert" => "Bob", "Seppo" => "Sepi" );
$bar = each( $foo );
       </programlisting>

      <para>
       <literal>$bar</literal> now contains the following key/value
       pairs:

       <itemizedlist spacing="compact">
        <listitem><simpara>0 => 'Robert'
        <listitem><simpara>1 => 'Bob'
        <listitem><simpara>key => 'Robert'
        <listitem><simpara>value => 'Bob'
       </itemizedlist>

    </example>
      

    <para>
     <function>each</function> is typically used in conjunction with
     <function>list</function> to traverse an array; for instance,
     $HTTP_POST_VARS: 

     <example><title>Traversing $HTTP_POST_VARS with each()</title>
      <programlisting>
echo "Values submitted via POST method:&lt;br&gt;";
while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
   echo "$key => $val&lt;br&gt;";
}
      </programlisting>
     </example>

    <para>
     See also <function>key</function>, <function>current</function>,
     <function>reset</function>, <function>next</function>, and
     <function>prev</function>.

   </refsect1>
  </refentry>


  <refentry id="function.end">
   <refnamediv>
    <refname>end</refname>
    <refpurpose>set internal pointer of array to last element</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef><function>end</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     <function>end</function> advances <parameter>array</parameter>'s
     internal pointer to the last element.
    <para>
     See also:
     <function>current</function>, <function>end</function>
     <function>next</function> and <function>reset</function>
   </refsect1>
  </refentry>

  <refentry id="function.key">
   <refnamediv>
    <refname>key</refname>
    <refpurpose>fetch a key from an associative array</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>mixed <function>key</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     <function>key</function> returns the index element of the
     current array position.
    <para>
     See also:
     <function>current</function>
     <function>next</function>
   </refsect1>
  </refentry>


  <refentry id="function.ksort">
   <refnamediv>
    <refname>ksort</refname>
    <refpurpose>Sort an array by key.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>ksort</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    
    <para>
     Sorts an array by key, maintaining key to data correlations. This
     is useful mainly for associative arrays.

    <example>
      <title><function>ksort</function> example</title>
      <programlisting>
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
ksort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
    echo "fruits[$key] = ".$fruits[$key]."\n";
}
</programlisting></example>
     This example would display:
     <computeroutput>
fruits[a] = orange
fruits[b] = banana
fruits[c] = apple
fruits[d] = lemon
</computeroutput>

    <simpara>
     See also <function>asort</function>, <function>arsort</function>, 
     <function>sort</function>, and <function>rsort</function>.

   </refsect1>
  </refentry>


  <refentry id="function.list">
   <refnamediv>
    <refname>list</refname>
    <refpurpose>
     assign variables as if they were an array
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>list</function></funcdef>
     <varargs>
    </funcsynopsis>
    <para>
     Like <function>array</function>, this is not really a function,
     but a language construct.  <function>list</function> is used to
     assign a list of variables in one operation.

     <example>
      <title><function>list</function> example</title>
      <programlisting>
&lt;table>
 &lt;tr>
  &lt;th>Employee name&lt;/th>
  &lt;th>Salary&lt;/th>
 &lt;/tr>
&lt;?php

$result = mysql($conn, "SELECT id, name, salary FROM employees");
while (list($id, $name, $salary) = mysql_fetch_row($result)) {
    print(" &lt;tr>\n".
          "  &lt;td>&lt;a href=\"info.php3?id=$id\">$name&lt;/a>&lt;/td>\n".
          "  &lt;td>$salary&lt;/td>\n".
          " &lt;/tr>\n");
}

?>&lt;/table>
</programlisting></example>

    <para>
     See also:
     <function>array</function>.
   </refsect1>
  </refentry>

  <refentry id="function.next">
   <refnamediv>
    <refname>next</refname>
    <refpurpose>advance the internal array pointer</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>mixed <function>next</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     Returns the array element in the next place that's pointed by the
     internal array pointer, or false if there are no more elements.
     <emphasis>Warning:</emphasis> if the array contains empty
     elements then this function will return false for these elements as
     well.  To properly traverse an array which may contain empty elements
     see the <function>each</function> function. 
    <para>
     <function>next</function> behaves like
      <function>current</function>, with one difference.  It advances
      the internal array pointer one place forward before returning
      the element.  That means it returns the next array element and
      advances the internal array pointer by one.  If advancing the
      internal array pointer results in going beyond the end of the
      element list, <function>next</function> returns false.

    <para>
     See also:
     <function>current</function>, <function>end</function>
     <function>prev</function> and <function>reset</function>
   </refsect1>
  </refentry>

  <refentry id="function.pos">
   <refnamediv>
    <refname>pos</refname>
    <refpurpose>return the current element in an array</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>mixed <function>pos</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <simpara>
	This is an alias for <function>current</function>.
    <para>
     See also:
     <function>end</function>, <function>next</function>,
     <function>prev</function> and <function>reset</function>.
   </refsect1>
  </refentry>

  <refentry id="function.prev">
   <refnamediv>
    <refname>prev</refname>
    <refpurpose>rewind internal array pointer</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>mixed <function>prev</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     Returns the array element in the previous place that's pointed by
     the internal array pointer, or false if there are no more
     elements. <emphasis>Warning:</emphasis> if the array contains empty
	 elements then this function will return false for these elements as
	 well.  To properly traverse an array which may contain empty elements
	 see the <function>each</function> function.
    <para>  
     <function>prev</function> behaves just like
     <function>next</function>, except it rewinds the internal array
     pointer one place instead of advancing it.
    <para>
     See also:
     <function>current</function>, <function>end</function>
     <function>next</function> and <function>reset</function>
   </refsect1>
  </refentry>

  <refentry id="function.reset">
   <refnamediv>
    <refname>reset</refname>
    <refpurpose>set internal pointer of array to first element</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef><function>reset</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     <function>reset</function> rewinds <parameter>array</parameter>'s
     internal pointer to the first element.
    <para>
     See also:
     <function>current</function>, <function>next</function>
     <function>prev</function> and <function>reset</function>
   </refsect1>
  </refentry>

  <refentry id="function.rsort">
   <refnamediv>
    <refname>rsort</refname>
    <refpurpose>Sort an array in reverse order</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>rsort</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
	This function sorts an array in reverse order (highest to lowest).
	<example>
      <title><function>rsort</function> example</title>
	<programlisting>
    $fruits = array("lemon","orange","banana","apple");
    rsort($fruits);
    for(reset($fruits); $key = key($fruits); next($fruits)) {
        echo "fruits[$key] = ".$fruits[$key]."\n";
    }
	</programlisting></example>
	This example would display:
	<computeroutput>
	fruits[0] = orange
	fruits[1] = lemon
	fruits[2] = banana
	fruits[3] = apple
	</computeroutput>
	The fruits have been sorted in reverse alphabetical order.
    <para>
     See also <function>arsort</function>, <function>asort</function>,
     <function>ksort</function>, <function>sort</function> and <function>usort</function>.
   </refsect1>
  </refentry>

  <refentry id="function.sizeof">
   <refnamediv>
    <refname>sizeof</refname>
    <refpurpose>get size of array</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>int <function>sizeof</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     Returns the number of elements in the array.
    <para>
     See also:
     <function>count</function>
   </refsect1>
  </refentry>

  <refentry id="function.sort">
   <refnamediv>
    <refname>sort</refname>
    <refpurpose>Sort an array</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>sort</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
    </funcsynopsis>
    <para>
     This function sorts an array.  Elements will be arranged from lowest to
     highest when this function has completed.
     <example>
      <title><function>sort</function> example</title>
	<programlisting>
$fruits = array("lemon","orange","banana","apple");
sort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
    echo "fruits[$key] = ".$fruits[$key]."\n";
}
</programlisting></example>
     This example would display:
     <computeroutput>
fruits[0] = apple
fruits[1] = banana
fruits[2] = lemon
fruits[3] = orange
</computeroutput>
     The fruits have been sorted in alphabetical order.
    <para>
     See also <function>arsort</function>, <function>asort</function>,
     <function>ksort</function>, <function>rsort</function>, and <function>usort</function>.
   </refsect1>
  </refentry>

  <refentry id="function.usort">
   <refnamediv>
    <refname>usort</refname>
    <refpurpose>Sort an array using a user-define comparison function</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcdef>void <function>usort</function></funcdef>
     <paramdef>array <parameter>array</parameter></paramdef>
     <paramdef>function <parameter>cmp_function</parameter></paramdef>
    </funcsynopsis>
    <para>
     This function will sort an array using a user-supplied comparison function.
	 If the array you wish to sort needs to be sorted by some non-trivial
	 criteria, you should use this function.
     <example>
      <title><function>usort</function> example</title>
	<programlisting>
function cmp($a,$b) {   
    if($a==$b) return 0;
    return ($a>$b) ? -1:1;
}
$a = array(3,2,5,6,1);
usort($a,cmp);
while(list($key,$value) = each($a)) {
    echo "$key: $value\n";
}
</programlisting></example>
     This example would display:
     <computeroutput>
0: 6
1: 5
2: 3
3: 2
4: 1
</computeroutput>
     Obviously in this trivial case the <function>rsort</function> function
	 would be more appropriate.
    <para>
     See also <function>arsort</function>, <function>asort</function>,
     <function>ksort</function>, <function>rsort</function> and <function>sort</function>.
   </refsect1>
  </refentry>

 </reference>

<!-- 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
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->