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. Quote Link to comment 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 Quote Link to comment 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"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.