【函数分享】每日PHP函数分享(2021-1-22)

ucwords () 函数把字符串中每个单词的首字符转换为大写。

ucwords ( string $str ) : string

 

参数描述

    str必需。规定要转换的字符串。

 

返回值:

    返回把字符串中每个单词的首字符转换为大写。

 

实例:

 

echo ucwords("hello world!");

// Hello World!

  

posted @ 2021-01-22 09:06  梦中程序员  阅读(55)  评论(0)    收藏  举报