public static function camelize($word)
    {
        $word = preg_replace('/[^a-zA-Z0-9\s]/', ' ', $word);
        $word = str_replace(' ', '', ucwords(strtolower(str_replace('_', ' ', $word))));
        return $word;
    }
public static function camelize($word)
    {
        $word = preg_replace('/[^a-zA-Z0-9\s]/', ' ', $word);
        $word = str_replace(' ', '', ucwords(strtolower(str_replace('_', ' ', $word))));
        return $word;
    }
public static function camelize ( $ word ) { $ word = preg_replace ( '/[^a-zA-Z0-9\s]/' , ' ' , $ word ) ; $ word = str_replace ( ' ' , '' , ucwords ( strtolower ( str_replace ( '_' , ' ' , $ word ) ) ) ) ; return $ word ; }
Returns given word as CamelCased

Converts a word like "foo_bar" or "foo bar" to "FooBar". It
will remove non alphanumeric characters from the word, so
"who's online" will be converted to "WhoSOnline"

@param   string 	$word    Word to convert to camel case
@return	string	UpperCamelCasedWord
Returns given word as CamelCased