public static function spaceToCamelCase($string, $type = '_', $first_char_caps = false)
    {
        if($first_char_caps === true)
        {
            $string[0] = strtoupper($string[0]);
        }

        $func = create_function('$c', 'return strtoupper($c[1]);');

        return preg_replace_callback('/' . $type . '([a-z])/', $func, $string);
    }