将传入的字符串的每个单词的首字符变成大写 1 2 3 $str = 'hellow word'; echo ucwords($str); //输出:Hellow Word 注:只修改每个单词的首字母,其他的没变化 相关函数: ucwords