prolife Posted February 20, 2015 Share Posted February 20, 2015 Hello guys! For every word in a sentence or phrase how do i make the first letter for each word a capital letter. Expecting your response Thanks guys! Link to comment https://forums.phpfreaks.com/topic/294747-for-every-word-in-a-sentence-or-phrase-how-do-i-make-the-first-letter-a-capital-letter/ Share on other sites More sharing options...
Ch0cu3r Posted February 20, 2015 Share Posted February 20, 2015 You would use ucwords Link to comment https://forums.phpfreaks.com/topic/294747-for-every-word-in-a-sentence-or-phrase-how-do-i-make-the-first-letter-a-capital-letter/#findComment-1506249 Share on other sites More sharing options...
prolife Posted February 20, 2015 Author Share Posted February 20, 2015 Thanks, works well. Link to comment https://forums.phpfreaks.com/topic/294747-for-every-word-in-a-sentence-or-phrase-how-do-i-make-the-first-letter-a-capital-letter/#findComment-1506251 Share on other sites More sharing options...
maxxd Posted February 20, 2015 Share Posted February 20, 2015 You can also do it in CSS using text-transform:capitalize; Link to comment https://forums.phpfreaks.com/topic/294747-for-every-word-in-a-sentence-or-phrase-how-do-i-make-the-first-letter-a-capital-letter/#findComment-1506253 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.