PHP function ucfirst()
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.
php
echo ucfirst('hello'); // helloecho ucfirst('cat'); // Catecho ucfirst('PHP'); // PHP