bool asort(array array[, int flags])

Sorts an array, maintaining the keys for the array values. The optional second parameter contains additional sorting flags. Returns true on success, false on failure. See Chapter 5 and sort for more information on using this function.

Get Programming PHP, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.