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. Link to comment https://forums.phpfreaks.com/topic/24727-using-strotupper-not-working/ Share on other sites More sharing options...
extrovertive Posted October 22, 2006 Share Posted October 22, 2006 ucfirst Link to comment https://forums.phpfreaks.com/topic/24727-using-strotupper-not-working/#findComment-112599 Share on other sites More sharing options...
localhost Posted October 22, 2006 Author Share Posted October 22, 2006 Pardon? Link to comment https://forums.phpfreaks.com/topic/24727-using-strotupper-not-working/#findComment-112603 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 Link to comment https://forums.phpfreaks.com/topic/24727-using-strotupper-not-working/#findComment-112604 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.