What are different type of sorting functions in PHP?

sort() – sort arrays in ascending order. asort() – sort associative arrays in ascending order, according to the value.
ksort() – sort associative arrays in ascending order, according to the key.
arsort() – sort associative arrays in descending order, according to the value.
rsort() – sort arrays in descending order.
krsort() – sort associative arrays in descending order, according to the key.
array_multisort() – sort the multi dimension array.
usort()- Sort the array using user defined function.

About Author

Leave a Reply

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

PAGE TOP
error

Enjoy this blog? Please spread the word :)

RSS
Follow by Email