PHP array_arsort( ) functionThe array_arsort( ) function is an inbuilt function of PHP. The array_arsort( ) function is used to sort an array in reverse order and the function maintains index association. This function was introduced in 4.0. SyntaxParameters
Return ValuesThe array_arsort( ) function returns true on success and false on failure. Example 1Output: Array ( [1] =>noida [2] =>hyderabad [0] => Bengaluru ) Example 2Output: Array ( [OS] => 95 [data structure] => 89 [compiler] => 68 ) Example 3Output: Array ( [ganguly] => 46 [sachin] => 45 [virat] => 29 ) Example 4Output: Array ( [c] =>yamuna [b] =>narmada [a] => ganga )
Next TopicPHP Array Functions
|