定義和用法
ucfirst() 函數把字符串中的首字符轉換爲大寫
語法
ucfirst(string)
參數解析
參數 | 描述 |
---|---|
string | 必需。規定要轉換的字符串。 |
示例
<?php
echo ucfirst("hello world!");
?>
輸出
Hello world!
ucfirst() 函數把字符串中的首字符轉換爲大寫
ucfirst(string)
參數解析
參數 | 描述 |
---|---|
string | 必需。規定要轉換的字符串。 |
示例
<?php
echo ucfirst("hello world!");
?>
輸出
Hello world!