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

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

Leave a comment

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