proctk Posted September 21, 2007 Share Posted September 21, 2007 Hi I have variables stored in a string how I want to make shure the the first letter of the string is large cap. any ideas how to do this Link to comment https://forums.phpfreaks.com/topic/70085-first-letter-large-cap/ Share on other sites More sharing options...
cooldude832 Posted September 21, 2007 Share Posted September 21, 2007 read up on string manipulations, you just need to trim the first character off and then put the styling on it. Link to comment https://forums.phpfreaks.com/topic/70085-first-letter-large-cap/#findComment-352008 Share on other sites More sharing options...
samoht Posted September 21, 2007 Share Posted September 21, 2007 you can use ucfirst http://us3.php.net/ucfirst Link to comment https://forums.phpfreaks.com/topic/70085-first-letter-large-cap/#findComment-352011 Share on other sites More sharing options...
proctk Posted September 21, 2007 Author Share Posted September 21, 2007 thank you for the help. I this to work but I'm having a hard time getting it to work in another spot. The difference is the for couple char are number and it not working any ideas why <li><?php echo ucfirst($value); ?></li> Link to comment https://forums.phpfreaks.com/topic/70085-first-letter-large-cap/#findComment-352029 Share on other sites More sharing options...
Jessica Posted September 21, 2007 Share Posted September 21, 2007 There is no such thing as a capital number, so you must mean something else? Link to comment https://forums.phpfreaks.com/topic/70085-first-letter-large-cap/#findComment-352030 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.