if (! function_exists ( 'multi_array_sort' )) {
function multi_array_sort($arr, $keys, $type = 'desc') {
$keysvalue = $new_array = array ();
foreach ( $arr as $k => $v ) {
$keysvalue [$k] = $v [$keys];
}
if ($type == 'asc') {
asort ( $keysvalue );
} else {
arsort ( $keysvalue );
}
reset ( $keysvalue );
foreach ( $keysvalue as $k => $v ) {
$new_array [] = $arr [$k];
}
return $new_array;
}
}