🎴 Flashcard Mode
Web Server Administration and PHP Development
Card1 / 14
Mastered0
Review0
QuestionClick to flip
Which is the function used to order backwards an associative array maintaining associations?
AnswerClick to flip back
A
krsort($array)
💡 Explanation:
krsort() sorts an associative array by key in reverse order (descending) while maintaining key-value associations. ksort() sorts ascending by keys. asort() sorts ascending by values. usort() sorts by values using a custom comparison function and doesn't maintain key associations.