Answers for "which of the following function is used to sort an array in descending order in php"

PHP
0

php sort reverse

<?php
$fruits = array("lemon", "orange", "banana", "apple");
rsort($fruits);
foreach ($fruits as $key => $val) {
    echo "$key = $valn";
}
?>
Posted by: Guest on July-02-2020

Code answers related to "which of the following function is used to sort an array in descending order in php"

Browse Popular Code Answers by Language