Hi,
I'm trying to perform a capitalization of a sentance so that each distinct word begins with a capital. However, I'm also trying to capitalize the second word in a hyphenated join - for which ucwords() does not handle.
For example, the string:
"hello new-world"
should be returned as:
"Hello New-World" and not
"Hello New-world" as ucwords does.
I've beeen looking into ereg_replace but the pattern matching seems to be too simplistic
Any ideas welcome. i'm trying to get something easily alterable as I'd like to put in extra patten matching to remove extra whitespace and change the case of capitals not at the beggining of a word.
Thanks
Steve