How Can I Capitalize the First Word of a String

The ucfirst() function capitalizes the first word in a string.

Example

Actual PHP Output

Hello world!