public static function capitalize($text, $delimiter = '-', $glue = '')
    {
        return implode($glue, array_map('ucfirst', explode($delimiter, strtolower($text))));
    }
public static function capitalize($text, $delimiter = '-', $glue = '')
    {
        return implode($glue, array_map('ucfirst', explode($delimiter, strtolower($text))));
    }
public static function capitalize ( $ text , $ delimiter = '-' , $ glue = '' ) { return implode ( $ glue , array_map ( 'ucfirst' , explode ( $ delimiter , strtolower ( $ text ) ) ) ) ; }
Capitalize words using hyphen or a custom delimiter.

@param string $text
@param string $delimiter
@param string $glue
@return string
Capitalize words using hyphen or a custom delimiter .