【函数分享】每日PHP函数分享(2021-1-22) 梦中程序员 2021-01-22 108 阅读1分钟 ucwords () 函数把字符串中每个单词的首字符转换为大写。 ucwords ( string $str ) : string 参数描述 str必需。规定要转换的字符串。 返回值: 返回把字符串中每个单词的首字符转换为大写。 实例: echo ucwords("hello world!");// Hello World!