PHP sort() Function

The sort() function sorts an indexed array in ascending order.This function sorts an array. Elements will be arranged from lowest to highest when this function has completed.If two members compare as equal, their relative order in the sorted array is undefined.

Example -

Example -