The rsort() function in PHP sorts an array in ______ order.

  • Descending
  • Ascending
  • Random
  • Unspecified
The rsort() function in PHP sorts an array in descending order. It rearranges the elements of an array in such a way that the values go from the largest to the smallest. This function modifies the original array directly, rearranging the elements based on their values in descending order. Sorting arrays in descending order is useful when you need to arrange array elements from highest to lowest values. Learn more: https://www.php.net/manual/en/function.rsort.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *