Page 1 of 1

simplistic question: changing a character to caps?

Posted: Mon Jun 14, 2010 11:07 am
by Callan S.
I'd like to show the players user name with a capital during combat description. I'm sure there's some PHP code that can grab the first letter, make an upper case version of it, then I'll take the first letter and the rest of the string and put it into a new string. Sorry for the simple question!
Edit: Actually this should probably go in coding - I'm never sure of the right category to put it in.

Re: simplistic question: changing a character to caps?

Posted: Mon Jun 14, 2010 2:14 pm
by Jony
This is what you might be looking for.

Re: simplistic question: changing a character to caps?

Posted: Mon Jun 14, 2010 7:15 pm
by Jackolantern
Yep, that is the best way to do it there. Luckily PHP includes a single function to do just that, so no need to worry about the other steps.

Re: simplistic question: changing a character to caps?

Posted: Mon Jun 14, 2010 7:57 pm
by Callan S.
So your saying I should uc it!? ;)

Thanks Jony! Kind of handy it had a function that did exactly what I needed!