PDA

View Full Version : Changing the first letter of a string variable to uppercase!



sir pannels
07-05-2002, 10:03 PM
Hey,
ok argh,
like it says.. how would i change the first character of $link to a upper case if its not already?
thanks everyone.
sir p

Mouldy_Goat
07-05-2002, 10:09 PM
There's actually a function that does just that... ucfirst()

So in this instance you'd do:

$link = ucfirst($link);