Class cArray
Array helper class.
Package: Core\Util
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc <murat@purc.de>
Located at classes/class.array.php
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc <murat@purc.de>
Located at classes/class.array.php
public static
array
|
|
public static
mixed|boolean
|
|
public static
array
|
#
sortWithLocale( array $arr, string $locale )
Sorts an array by changing the locale temporary to passed value. |
public static
array
|
#
csort( )
Very cool algorithm for sorting multi-dimensional arrays. Found at http://us2.php.net/manual/en/function.array-multisort.php Syntax: $new_array = cArray::csort($array [, 'col1' [, SORT_FLAG [, SORT_FLAG]]]...); Explanation: $array is the array you want to sort, 'col1' is the name of the column you want to sort, SORT_FLAGS are : SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING you can repeat the 'col',FLAG,FLAG, as often you want, the highest prioritiy is given to the first - so the array is sorted by the last given column first, then the one before ... Example: $array = cArray::csort($array,'town','age', SORT_DESC, 'name'); |
public static
|
#
initializeKey( array & $aArray, string $sKey, mixed $mDefault = '' )
Ensures that the passed array has the key, sets it by using te value |