Skip to content

rsort ​

php
bool rsort ( array &$tablica )

Sorts $tablica from highest to lowest value. Returns true if sorting succeeds.

Example:

php
$zbior = array(7,3,6,2,11,4);
rsort($zbior)
print_r($zbior);

Result:

Array
(
    [0] => 11
    [1] => 7
    [2] => 6
    [3] => 4
    [4] => 3
    [5] => 2
)