Page 1 of 1

formating text

Posted: Sun Jan 16, 2005 3:00 pm
by zactanaz
Hello, I search the forums but could not find anything...

here is my questions...

what i want to do is to format text from a variable.

for example this the variable

Code: Select all

$text = "SAMPLE TEXT";
what i want is to change the text into Upper case each letter of the beggining of the word and the rest in lower case.

If i have a text like this: SAMPLE TEXT or SaMpLe TeXt or sample text to format it to something like this Sample Text.

Is this possible?

Thanks in advance.

Posted: Sun Jan 16, 2005 3:05 pm
by Cronikeys
ucwords($text);