PHP function uasort()

Availability in PHP 4.0

Sort fields using a user-defined comparison function and preserve index assignments

Parameters

Parameter Data type Default value Note
$array array not Input array.
$cmp_function callback not For examples of user-defined comparison functions, see usort and uksort.

Return values

bool

Returns true on success, otherwise false on failure.

Other resources

Official uasort documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.