Display the text box

rsort()

« round | rtrim »
<?php
$array 
=
    
// array $array

$bool rsort (
    
// array &$array
    
?  // [int $sort_flags = SORT_REGULAR]
);
?>
Result
$array = [
  
=> 'orange',
  
=> 'lemon',
  
=> 'banana',
  
=> 'apple',
]
$bool = true
Examples
#1 rsort  (/* $array = [0 => "lemon", 1 => "orange", 2 => "banana", 3 => "apple"] */
 
$array)
#2 rsort  (/* $array = [0 => "Orange1", 1 => "orange2", 2 => "Orange3", 3 => "orange20"] */
 
$array,
 
SORT_NATURAL SORT_FLAG_CASE)
#3 rsort  (/* $array = [0 => "lemon"] */
 
[=> 123])
See also
arsort, krsort, sort