时间:2021-07-01 10:21:17 帮助过:3人阅读
首字母变大写:ucwords()
| 代码如下 | |
|
$foo = 'hello world!'; $bar = 'HELLO WORLD!'; |
|
第一个词首字母变大写:ucfirst()
| 代码如下 | |
|
$foo = 'hello world!'; $bar = 'HELLO WORLD!'; |
|
第一个词首字母小写lcfirst()
| 代码如下 | |
|
$foo = 'HelloWorld'; $bar = 'HELLO WORLD!'; |
|
http://www.bkjia.com/PHPjc/632754.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632754.htmlTechArticle在php中如果我们要把字符转换成大小写直接使用strtolower或者strtoupper即可,但是要首字母要转换大小写我们需要使用ucwords相关函数 首字母变...