Home »
MCQs »
PHP MCQs
Which PHP function is used to sort an associative array in descending order, according to the key?
119. Which PHP function is used to sort an associative array in descending order, according to the key?
- sort()
- rsort()
- ksort()
- krsort()
Answer: D) krsort()
Explanation:
The PHP function krsort() is used to sort an associative array in descending order, according to the key.