localhost Posted October 22, 2006 Share Posted October 22, 2006 I was hoping someone could help me out with this, it is pretty self-explanatory.[code]$sentence = "i wanna make the beginning letter capital only."; // $words is now an array $words = explode(" ", $sentence); foreach ($words as $word) { $word = strtoupper(substr($word, 1, 1)); echo $word; }[/code]This outputs:AAHEEANThanks for any help you can give. Quote Link to comment Share on other sites More sharing options...
extrovertive Posted October 22, 2006 Share Posted October 22, 2006 ucfirst Quote Link to comment Share on other sites More sharing options...
localhost Posted October 22, 2006 Author Share Posted October 22, 2006 Pardon? Quote Link to comment Share on other sites More sharing options...
Barand Posted October 22, 2006 Share Posted October 22, 2006 It's a php functionhttp://www.php.net/ucfirst Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.