Zeradin Posted September 22, 2008 Share Posted September 22, 2008 people posting on my site will not remember to capitalize their titles. Is there a function that gets the first letter of each word? or can I call out like "a character after a blank space?" so i can make the titles auto caplitalize. Thanks. Link to comment https://forums.phpfreaks.com/topic/125301-solved-auto-caplitalize-titles/ Share on other sites More sharing options...
Zeradin Posted September 22, 2008 Author Share Posted September 22, 2008 http://www.tizag.com/phpT/php-string-strtoupper-strtolower.php oops Link to comment https://forums.phpfreaks.com/topic/125301-solved-auto-caplitalize-titles/#findComment-647689 Share on other sites More sharing options...
JonnoTheDev Posted September 22, 2008 Share Posted September 22, 2008 There are a couple of methods: 1: $name = "joe bloggs"; // will print Joe Bloggs print ucwords($name); 2: $name = "david o'leary"; // will print David O'Leary - ucwords() will not in this case print mb_convert_case($name, MB_CASE_TITLE, "UTF-8"); Link to comment https://forums.phpfreaks.com/topic/125301-solved-auto-caplitalize-titles/#findComment-647691 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.