Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

ucfirst

Description

The ucfirst of String for PHP make a string's first character uppercase.

Syntax

ucfirst(
    string $string
): string

Parameters

string

The input string.

Return

Returns the resulting string.

Examples

1 · string · lower

<?

$string = 'case case case';

$return = ucfirst($string);

echo $return;

?>
Case case case

2 · string · camel

<?

$string = 'Case Case Case';

$return = ucfirst($string);

echo $return;

?>
Case Case Case

3 · string · upper

<?

$string = 'CASE CASE CASE';

$return = ucfirst($string);

echo $return;

?>
CASE CASE CASE
HomeMenu