The asort() function in PHP sorts an associative array in ascending order based on its values, while maintaining the association between keys and values.

  • TRUE
  • FALSE
The correct option is 1. The asort() function in PHP sorts an associative array in ascending order based on its values. It rearranges the elements of the array while maintaining the association between keys and values. After sorting, the keys remain associated with their corresponding values. This is useful when you need to sort an associative array based on the values while preserving the relationship between keys and values. The original key-value association is retained after the sorting operation. Learn more: https://www.php.net/manual/en/function.asort.php
Add your answer
Loading...

Leave a comment

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