The function that you want is called: ucfirst()
To make sure that string are consistant you might want to convert all
characters in the string to Lower case first then call this function. This
will ensure that stuff like "JoHn sMITH" gets converted to "John Smith"
> -----Original Message-----
> From: PHP Junkie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 11:39 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Capitalize Function ??
> I know this one will be an easy one ...
> I'm taking in first name and last name data into a MySQL db
> through a form. Users sometimes don't capitalize their first and
> last names when entering the data. Is there a function to clean
> this up for consistency? If so, what is the name of the function
> that performs this?
> Thanks in advance,
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]