The krsort() function sorts an associative array in descending order, according to the key.
Sort an associative array in descending order, according to the key:
Run Example>>