← All built-ins / ucwords()

ucwords()

ucwords(string $s): string

Parameters

NameTypeDescription
$sstringinput string

Return value

The string with the first letter of every word uppercased.

Example

echo ucwords("holy php language");
Holy Php Language

See also

ucfirst()strtoupper()