Function sortByKey
Sorts given $array by key $sortby.
Package: Cake
Link: http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#sortByKey
Copyright: Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Located at Cake/basics.php
Link: http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#sortByKey
Copyright: Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Located at Cake/basics.php
sortByKey( array $array , string $sortby , string $order = 'asc' , integer $type = SORT_NUMERIC )
Parameters summary
array |
& $array |
Array to sort |
string |
$sortby |
Sort by this key |
string |
$order = 'asc' |
Sort order asc/desc (ascending or descending). |
integer |
$type = SORT_NUMERIC |
Type of sorting to perform |
Returns
-
mixed
Sorted array