Jam*_*ott 15
$str = 'stRing';
ucfirst(strtolower($str));
Run Code Online (Sandbox Code Playgroud)
将输出:字符串
做就是了
ucfirst(strtolower($string)); //Would output "Herman archer lives in new york"
Run Code Online (Sandbox Code Playgroud)
另外,如果您希望每个单词都以大写字母开头,则可以这样做
ucwords(strtolower($string)); //Would output "Herman Archer Lives In New York"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6170 次 |
| 最近记录: |