PHP function ucfirst()
Enlarges the first character in the string.
Availability in PHP 4.0
Enlarges the first character in the string.
Parameters
| Parameter | Data type | Default value | Note |
|---|---|---|---|
$str |
string |
not | Input string |
Return values
string
Modified string.
echo ucfirst('hello'); // hello
echo ucfirst('cat'); // Cat
echo ucfirst('PHP'); // PHP
Other resources
Loading comments...