Name
ucfirst()
Synopsis
string ucfirst ( string str
)
The ucfirst()
function takes one string parameter and converts the first letter of the string to an uppercase character, leaving the others untouched.
$string = "i like to program in PHP"; $a = strtoupper($string);
In that example, $a
will be set to "I like to program in PHP".
Get PHP in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.