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.
natsort (): sorting the in order we expect.
natcasesort(): case insensitive natsort.
ksort(): sorts an array by its keys.
krsort(): reverse of ksort
Usort(): sorting an array by using user defined comparison algorithm 


Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in D:\webserver\www\vcampusbd_com_https\answers\column_answer_two.php on line 128
+ Report
Total Preview: 576
What are the different functions in sorting an array?Discuss them?

Copyright © 2024. Powered by Intellect Software Ltd