Page 1 of 1

help with ltrim and ucfirst

Posted: Sat May 03, 2008 2:33 pm
by gammaman
lets say I have a statement $var= " name";

How would I combine ltrim and ucfirst togther to get $var="Name";

Re: help with ltrim and ucfirst

Posted: Sat May 03, 2008 3:20 pm
by Christopher
Since the first character is a space, you don't want to uppercase it. As I recall uppercase spaces are very similar to lowercase spaces in appearance. So it looks like you should trim first and then uppercase.