RE: Re: [PHP] Capitalize Function ??

2001-07-24 Thread PHP Junkie

True.  or what about the Irish.. The Mc***'s or the Mac*'s !!
Hmmm?  This will be a challenge for sure!!

Alexander Skwar <[EMAIL PROTECTED]> wrote:

>So sprach »PHP Junkie« am 2001-07-23 um 21:39:07 -0400 :
>> 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?
>
>Yep, ucwords.
>
>But this is not a good idea!  There are Names (like "Hans vom Bach" or
>somesuch) which do NOT have to be captialized.  Actually, capitalizing
>the "vom" would be wrong.  Although this was just a German example, I'd
>bet there are names in French, Dutch, Spanish, Italian as well which
>should not be capitalized.  Hmm, how about English?  Sometimes there are
>suffixes like "the 3rd", no?  Would it be right to capitalize this?
>
>
>Alexander Skwar
>--
>How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
>Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
>   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
>Uptime: 1 day 7 hours 12 minutes
>


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


-- 
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]




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Alexander Skwar

So sprach »Brian Dunworth« am 2001-07-24 um 10:00:36 -0400 :
>   Well, usually that'd be "III".  Of course, "John Smith, Iii" would be
> wrong...

Actually, this wouldn't matter as ucwords doesn't seem to touch all
capitalized word's - or so it was last time I checked IIRC.

But your scottish examples were very good, indeed.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 18 hours 8 minutes

--
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]




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Alexander Skwar

So sprach »Ryan Fischer« am 2001-07-24 um 13:18:33 -0400 :
> Never heard of that one before.  Usually, a medical doctor adds an
> "M.D." at the end of his name indicating so.

Hmm, this maybe the case in the states.  "Dr. med." is the German title.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 17 hours 59 minutes

--
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]




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Ryan Fischer

You wrote:
> So sprach »Ryan Fischer« am 2001-07-24 um 07:35:37 -0400 :
> > Usually, "the 3rd" is written as "John Doe, III," AFAIK, so that's
not
> > really an issue.
>
> Okay, III isn't an issue then.  What about people with Dr. titles?
Like
> 'Dr. med John Doe'.  There the 'med' shouldn't be capitalized.

Never heard of that one before.  Usually, a medical doctor adds an
"M.D." at the end of his name indicating so.

> And I'm sure, there are enough other examples - but: it's your app,
> *I* would not do it, but that's just me.  If people are too lazy
> to type there name correctly capitalized, than it's their problem
> IMHO.

Agreed.  ;)

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



-- 
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]




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Alexander Skwar

So sprach »Ryan Fischer« am 2001-07-24 um 07:35:37 -0400 :
> Usually, "the 3rd" is written as "John Doe, III," AFAIK, so that's not
> really an issue.

Okay, III isn't an issue then.  What about people with Dr. titles?  Like
'Dr. med John Doe'.  There the 'med' shouldn't be capitalized.  And I'm
sure, there are enough other examples - but: it's your app, *I* would
not do it, but that's just me.  If people are too lazy to type there
name correctly capitalized, than it's their problem IMHO.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 16 hours 35 minutes

--
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]




RE: [PHP] Capitalize Function ??

2001-07-24 Thread Brian Dunworth

On Tuesday, July 24, 2001 2:32 AM, Alexander Skwar said:

> But this is not a good idea!  There are Names (like "Hans vom Bach" or
> somesuch) which do NOT have to be captialized.  Actually, capitalizing
> the "vom" would be wrong.  Although this was just a German
> example, I'd bet there are names in French, Dutch, Spanish, Italian as
> well which should not be capitalized.

 ..or, at least not capitalized in the simple fashion of ucwords().

  Leonardo da Vinci
  Otto von Bismarck

> Hmm, how about English?

 ..or Scottish, or Irish?

  Elle MacPherson
  Angus MacGyver
  Ronald McDonald

> Sometimes there are suffixes like "the 3rd", no?  Would it be right
> to capitalize this?

  Well, usually that'd be "III".  Of course, "John Smith, Iii" would be
wrong...

 - Brian


 ---
  Brian S. Dunworth
  Sr. Software Development Engineer
  Oracle Database Administrator
  The Printing House, Ltd.
  (850) 875-1500 x225
 ---


-- 
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]




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Ryan Fischer

You wrote:
> So sprach »PHP Junkie« am 2001-07-23 um 21:39:07 -0400 :
> > 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?
>
> Yep, ucwords.
>
> But this is not a good idea!  There are Names (like "Hans vom Bach" or
> somesuch) which do NOT have to be captialized.  Actually, capitalizing
> the "vom" would be wrong.  Although this was just a German example,
I'd
> bet there are names in French, Dutch, Spanish, Italian as well which
> should not be capitalized.  Hmm, how about English?  Sometimes there
are
> suffixes like "the 3rd", no?  Would it be right to capitalize this?

Usually, "the 3rd" is written as "John Doe, III," AFAIK, so that's not
really an issue.

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



-- 
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]




Re: [PHP] Capitalize Function ??

2001-07-23 Thread Alexander Skwar

So sprach »PHP Junkie« am 2001-07-23 um 21:39:07 -0400 :
> 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?

Yep, ucwords.

But this is not a good idea!  There are Names (like "Hans vom Bach" or
somesuch) which do NOT have to be captialized.  Actually, capitalizing
the "vom" would be wrong.  Although this was just a German example, I'd
bet there are names in French, Dutch, Spanish, Italian as well which
should not be capitalized.  Hmm, how about English?  Sometimes there are
suffixes like "the 3rd", no?  Would it be right to capitalize this?


Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 7 hours 12 minutes

--
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]




RE: [PHP] Capitalize Function ??

2001-07-23 Thread Matthew Loff


I think ucfirst() only does the first character of the string...

ucwords() will do all the parts of the name.

The only shortcoming I've found is if people put in a middle initial and
add a period to it, or put a nickname in quotes... ucwords() skips
those.


-Original Message-
From: Opec Kemp [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 23, 2001 9:53 PM
To: PHP Junkie
Cc: PHP List
Subject: RE: [PHP] Capitalize Function ??


The function that you want is called: ucfirst()

http://www.php.net/manual/en/function.ucfirst.php

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" consistantly.

> -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]


-- 
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]




RE: [PHP] Capitalize Function ??

2001-07-23 Thread Opec Kemp

The function that you want is called: ucfirst()

http://www.php.net/manual/en/function.ucfirst.php

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"
consistantly.

> -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]




[PHP] Capitalize Function ??

2001-07-23 Thread PHP Junkie

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,

Gene Kelley
Web Developer
BizFlow Data Solutions, Inc.
http://www.bizflowdata.net/


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


-- 
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]