[PHP] Case Conversion of US Person Names

2009-07-16 Thread phphelp -- kbk
Hi, All -- -- - - I occasionally find myself in need of a utility to do case conversion of people's names, especially when I am converting data from an old to a new system. This is the first such occasion in PHP. I know about ucwords() and mb_convert_case(). They do not accommodate names

RES: [PHP] Case Conversion of US Person Names

2009-07-16 Thread Jônatas Zechim
Assunto: [PHP] Case Conversion of US Person Names Hi, All -- -- - - I occasionally find myself in need of a utility to do case conversion of people's names, especially when I am converting data from an old to a new system. This is the first such occasion in PHP. I know about ucwords

Re: RES: [PHP] Case Conversion of US Person Names

2009-07-16 Thread phphelp -- kbk
On Jul 16, 2009, at 1:19 PM, Jônatas Zechim wrote: U can try this: function fNme($n){ $tN=count($n=explode(' ',strtolower($n))); $nR=''; for($i=0;$i$tN;$i++){if($i==0){$nR.=strlen($n[$i])3?ucwords($n [$i]):$n[$i] ;}else{$nR.=strlen($n[$i])3?' '.ucwords($n[$i]):'

Re: [PHP] Case Conversion of US Person Names

2009-07-16 Thread phphelp -- kbk
On Jul 16, 2009, at 4:06 PM, Leonard Burton wrote: Try this class here: http://code.google.com/p/lastname/ Oo! That looks *very* interesting. Thank you. Have you tried it? Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php