formating text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zactanaz
Forum Newbie
Posts: 4
Joined: Sun Jan 16, 2005 2:53 pm
Location: California,USA

formating text

Post 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.
Cronikeys
Forum Commoner
Posts: 35
Joined: Sun Jan 16, 2005 9:14 am

Post by Cronikeys »

ucwords($text);
Post Reply