jwk811 Posted November 19, 2006 Share Posted November 19, 2006 when someone submits a text through a form is there a way that i could capitalize the first letter of the word before i say.. put it into the database? Link to comment https://forums.phpfreaks.com/topic/27794-is-there-a-way-to-capitalize-the-first-letter-of-a-word-automatically/ Share on other sites More sharing options...
fert Posted November 19, 2006 Share Posted November 19, 2006 yes, ucwords Link to comment https://forums.phpfreaks.com/topic/27794-is-there-a-way-to-capitalize-the-first-letter-of-a-word-automatically/#findComment-127151 Share on other sites More sharing options...
emehrkay Posted November 19, 2006 Share Posted November 19, 2006 http://www.php.net/ucwords Link to comment https://forums.phpfreaks.com/topic/27794-is-there-a-way-to-capitalize-the-first-letter-of-a-word-automatically/#findComment-127152 Share on other sites More sharing options...
jwk811 Posted November 19, 2006 Author Share Posted November 19, 2006 sweeet.. thanks Link to comment https://forums.phpfreaks.com/topic/27794-is-there-a-way-to-capitalize-the-first-letter-of-a-word-automatically/#findComment-127160 Share on other sites More sharing options...
alexcmm Posted November 20, 2006 Share Posted November 20, 2006 Hey, is there a way to make sure the entire field IS capitalized? Link to comment https://forums.phpfreaks.com/topic/27794-is-there-a-way-to-capitalize-the-first-letter-of-a-word-automatically/#findComment-127283 Share on other sites More sharing options...
doni49 Posted November 20, 2006 Share Posted November 20, 2006 Do you mean take the contents of the field and give the UPPERCASE of what they typed?strtoupper($_POST['field1']);http://us2.php.net/manual/en/function.strtoupper.phpOr do you mean to check and SEE if they typed UPPER case? If the latter, use a regular expression. Link to comment https://forums.phpfreaks.com/topic/27794-is-there-a-way-to-capitalize-the-first-letter-of-a-word-automatically/#findComment-127296 Share on other sites More sharing options...
alexcmm Posted November 20, 2006 Share Posted November 20, 2006 I found that out right after I posted. But thanks for hte speedy reply! Link to comment https://forums.phpfreaks.com/topic/27794-is-there-a-way-to-capitalize-the-first-letter-of-a-word-automatically/#findComment-127310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.