ucfirst php
PHP ucfirst()函数 (PHP ucfirst() function)
ucfirst() function is a string function, it is used to convert first character to uppercase. It accepts string and returns string with first uppercase character.
ucfirst()函数是一个字符串函数,用于将第一个字符转换为大写。 它接受字符串,并返回第一个大写字符的字符串。
Syntax:
句法:
ucfirst(string);
Example:
例:
Input: "this is MY computer!"
Output: "This is MY computer!"
PHP code:
PHP代码:
<?PHP
$str = "this is MY computer!";
echo (ucfirst($str));
?>
Output
输出量
This is MY computer!
翻译自: https://www.includehelp.com/php/ucfirst-function-with-example.aspx
ucfirst php