Sort Array of Numbers in Descending Order using PHP

rsort function

<?php

$numbers = [10, 3, 17, 50, 15];
rsort($numbers);

print_r($numbers);

Leave a Comment

Cancel reply

Your email address will not be published.