Its syntax is: string ucwords (string string) <? $sentence = "cooking and programming"; $sentence = ucwords($sentence); print $sentence; ?>