Sort array by key (human order)

function natksort(&$array) {
    $keys = array_keys($array);
    natcasesort($keys);
    if (is_array($keys) && count($keys)) {
        foreach ($keys as $k) {
            $new_array[$k] = $array[$k];
        }
    }
    $array = $new_array;
    return true;
}