PHP arsort() Function

The arsort() function is used to sort an array in reverse order. The function maintains index association.This function is used mainly when sorting associative arrays where the actual element order is significant.

Example -

Example -