nameParse();

Posted in code by g @ December 4th, 2008 ::

I wrote a PHP class for a project at work this week and found it so useful, that I turned it into a Google Code project. What it does is take a name string as input and it breaks it into five individual elements: first name, middle name(s), last name, title, and suffix.

full(Dr. Sarah Lee Bobby Jones III)
first(Sarah) middle(Lee Bobby) last(Jones) suffix(III) title(Dr.)

full(conforette, telly m.)
first(telly) middle(m.) last(conforette) suffix() title()

It’s pretty useful as I’m sure there’s loads of webapps out there that need to do this sort of thing…

Post a Comment