PHP krsort() function
The PHP krsort( ) function is used to sort the array elements by the key in descending order. It is mainly used in the associative array. This function was introduced in PHP 4.0.
The krsort( ) function returns true on success or false on failure.
Array ( [punjab] =>chandigarh [karnataka] =>bangalore [jharkhand] =>ranchi [goa] =>panaji [bihar] =>patna )
Array ( [d] => volleyball [c] => hockey [b] => football [a] => cricket )
Array ( [z] =>php [y] => java [x] => html )
Array ( [virat] => 29 [sachin] => 45 [ganguly] => 46 )