ucwords() function capitalizes the first letter of each word in a string.
Its syntax is: string ucwords (string string) <? $sentence = "cooking and programming"; $sentence = ucwords($sentence); print $sentence; ?>