API17:JArrayHelper::sortObjects
From Joomla! Documentation
JArrayHelper::sortObjects
Description
Utility function to sort an array of objects on a given field.
public static function sortObjects (
&$a
$k
$direction=1
$casesensitive=true
$locale=false
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| &$a | array | $arr An array of objects | |
| $k | array | The key or a array of key to sort on | |
| $direction | array | 1 | Direction or an array of direction to sort in [1 = Ascending] [-1 = Descending] |
| $casesensitive | array | true | Let sort occur case sensitive or insensitive |
| $locale | array | false | Let sort occur using the locale language or not |
- Returns array The sorted array of objects
- Defined on line 294 of libraries/joomla/utilities/arrayhelper.php
- Since

See also
JArrayHelper::sortObjects source code on BitBucket
Class JArrayHelper
Subpackage Utilities- Other versions of JArrayHelper::sortObjects
User contributed notes
Code Examples