Convert the first character of "hello" to uppercase:
<?php
echo ucfirst("hello world!");
?>
Try it Yourself »
The ucfirst() function converts the first character of a string to uppercase.
Related functions:
ucfirst(
string)
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
Return Value: | Returns the converted string |
---|---|
PHP Version: | 4+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!