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'); // hello
echo ucfirst('cat'); // Cat
echo ucfirst('PHP'); // PHP

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.