Sorting Arrays

Sorting Indexed Arrays #

By Value #

sort() #

sort() is a built-in function in PHP that can be used to sort arrays in ascending order., in ascending order, by value. The associated keys are not preserved during this. Run the code below to see an example of sort().