好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

phpucfirst函数怎么用

php ucfirst函数用于字符串首字母大写,ucfirst语法是ucfirst(string),参数string是必须的,规定要转换的字符串。

php ucfirst函数怎么用?

作用:字符串首字母大写

语法:

ucfirst(string)

参数:

string 必须,规定要转换的字符串。

说明:把字符串中的首字符转换为大写。

php ucfirst()函数使用示例1

<?php
$i = "hello world";
$j = ucfirst($i);
echo $j;
?>

输出:

Hello world

php ucfirst()函数使用示例2

<?php
echo ucfirst("hi php.cn");
?>

输出:

Hi php.cn

以上就是php ucfirst函数怎么用的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于phpucfirst函数怎么用的详细内容...

  阅读:36次