How to make first letter of a word capital?

user690436 picture user690436 · Apr 4, 2011 · Viewed 15.2k times · Source

I have a word default and I want a php function to make only first letter capital. Can we do that. Please help me out as I am very new to php coding.

Answer

fabrik picture fabrik · Apr 4, 2011

You may want to use ucfirst().

For multibyte strings, please see this snippet.