PHP ucwords() Function

ucwords(string) — This PHP function returns a string with the first letter of each word in the input string converted to uppercase.

Try it here. Enter your string below to see the function in action:
e.g. An input of 'mary had a little lamb.' will produce
'Mary Had A Little Lamb.'

Function Result
Test String:
Function Result: