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

mb_ucfirst

Description

The mb_ucfirst of Multibyte String for PHP makes the first character of a string uppercase.

Syntax

mb_ucfirst(
    string $string,
    ?string $encoding = null
): string

Parameters

string

The input string.

encoding

The character encoding.

If omitted or null, the internal character encoding value will be used.

Return

Returns the modified string.

Examples

1 · string

<?

$string = "äbel";

$return = mb_ucfirst($string);

echo $return;
Äbel

2 · encoding

<?

$string = "äbel";
$encoding = "UTF-8";

$return = mb_ucfirst($string, $encoding);

echo $return;
Äbel