PHP ucfirst() 函數(shù)
定義和用法
ucfirst() 函數(shù)把字符串中的首字符轉換為大寫。
語法
ucfirst(string)
參數(shù) | 描述 |
---|---|
string | 必需。規(guī)定要轉換的字符串。 |
例子
<?php echo ucfirst("hello world"); ?>
輸出:
Hello world
ucfirst() 函數(shù)把字符串中的首字符轉換為大寫。
ucfirst(string)
參數(shù) | 描述 |
---|---|
string | 必需。規(guī)定要轉換的字符串。 |
<?php echo ucfirst("hello world"); ?>
輸出:
Hello world