Question:What are the different functions in sorting an array?Discuss them?
Answer
sort(): sort array in ascending order.
rsort():sort array in descending order.
asort() : Sort array in ascending order with key/value.
arsort(): reverse of assort.
ksort(): sorts an array by its keys.
krsort():reverse of ksort
+ Report
What are the different functions in sorting an array?Discuss them?