array_sorter
in package
Table of Contents
Properties
Methods
- _as_cmp() : mixed
- Custom sort function
- array_sorter() : mixed
- Constructor
- sortit() : mixed
- Sort method
Properties
$sarray
public
mixed
$sarray
= \false
$sasc
public
mixed
$sasc
= \true
$skey
public
mixed
$skey
= \false
Methods
_as_cmp()
Custom sort function
public
_as_cmp(mixed $a, mixed $b) : mixed
Parameters
- $a : mixed
-
an array entry
- $b : mixed
-
an array entry
Tags
array_sorter()
Constructor
public
array_sorter(mixed &$array, string $key[, bool $asc = true ]) : mixed
Parameters
- $array : mixed
-
array to sort
- $key : string
-
array key to sort by
- $asc : bool = true
-
sort order (ascending or descending)
Tags
sortit()
Sort method
public
sortit([bool $remap = true ]) : mixed
Parameters
- $remap : bool = true
-
if true reindex the array to rewrite indexes