Re: [PHP] Re: Question about "shortening" a string

2005-03-12 Thread Jochem Maas
Ashley M. Kirchner wrote: Mário Gamito wrote: ... >> Does anyone knows how to do this ? > > $parts = explode(' ', $fullName); > $shortenedName = $parts[0].' '.$parts[count($parts)-1]; > ?> > This might solve one problem. What about people who have names like 'Pablo Ricardo del Rey' where you

Re: [PHP] Re: Question about "shortening" a string

2005-03-11 Thread Ashley M. Kirchner
Mário Gamito wrote: Hi Sokolewicz, Thanks a lot. It just working really fine :) M. Sokolewicz wrote: > Mário Gamito wrote: > >> For example, if i fill the form with "Mário Augusto Machado dos Reis Gamito", i want to change this string to only "Mário Gamito". >> >> The total number of names is not

Re: [PHP] Re: Question about "shortening" a string

2005-03-11 Thread Mário Gamito
Hi Sokolewicz, Thanks a lot. It just working really fine :) Thank you again. Warm regards, Mário Gamito M. Sokolewicz wrote: > Mário Gamito wrote: > >> Hi, >> >> In Portgal we have big names. >> My complete name, for instance, is "Mário Augusto Machado dos Reis Gamito". >> "Mário" is the Christian

[PHP] Re: Question about "shortening" a string

2005-03-11 Thread M. Sokolewicz
Mário Gamito wrote: Hi, In Portgal we have big names. My complete name, for instance, is "Mário Augusto Machado dos Reis Gamito". "Mário" is the Christian name and "Gamito" - the last one - is always the last name of the father. I have a form where i want to let my users insert their full big nam