Name

asort

Synopsis

$sorted_array = asort($array);

Returns a sorted copy of the associative array array. asort works only on associative arrays. Use sort to sort regular arrays. If the first member of the array is a number the returned array will be sorted numerically, otherwise the returned array will be sorted alphabetically.

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.