您现在的位置是:首页 > PHP函数

李清波 2021-06-17 PHP函数 1767 复制当前网址

ucfirst



PHP ucfirst() 函数

定义和用法

ucfirst() 函数把字符串中的首字符转换为大写。


语法

ucfirst(string)


参数描述
string必需。规定要转换的字符串。


例子

<?php
echo ucfirst("hello world");
?>

输出:

Hello world


文章来源:https://www.liqingbo.com/blog-886.html

上一篇:ucwords

下一篇:trim

评论