Definition
The ucfirst() function is used to convert the first character of a string to uppercase.
Syntax
ucfirst(string)
Parameters
Parameter | Description |
---|---|
string |
Required. Specifies the string to convert. |
Example
<?php
echo ucfirst("welcome to php!");