Forum Moderators: coopster

Message Too Old, No Replies

First letter of a word in uppercase

         

turbohost

12:56 pm on Sep 3, 2004 (gmt 0)

10+ Year Member



Hi Guys,

How can I make sure in php that a word always starts with an uppercase? Let's say I've got a parameter $word holding the word 'wordlowercase' and I want it to be 'Wordlowercase'.

Turbo

blaketar

1:10 pm on Sep 3, 2004 (gmt 0)

10+ Year Member



$Word = ucwords("$YourVariable")

or

$Word = ucfirst("$YourVariable")

turbohost

1:14 pm on Sep 3, 2004 (gmt 0)

10+ Year Member



Thx, it works!