What is sort function?

The sort() function is used for sorting the elements of the indexed array in ascending order (alphabetically for letters and numerically for numbers). Example. This print_r() statement gives the following output: Similarly you can sort the numeric elements of the array in ascending order.
For More Information Please Refer:
https://www.tutorialrepublic.com/php-tutorial/php-sorting-arrays.php
You May Also Like to Read: