Re: Generating Logins

From: Date: Thu, 03 Aug 2000 19:24:46 +0000
Subject: Re: Generating Logins
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10016@lists.php.net to get a copy of this message
Oh, I am assuming that the first name is Kate...that's where the "k" comes from. "Rohan Amin" <ramin@givingcapital.com> wrote in message news:8mcgqg$lod$1@toye.php.net... > Hello, > > I want to be able to generate a User Name given the First Name and Last > Name. > > I want the User Name to be the first initial of the first name and the first > 7 characters of the last name for a total of 8 characters. > > > Right now I have the following: > > $USER_NAME = substr($FIRST_NAME, 0, 1); > $USER_NAME .= substr($LAST_NAME, 0, 7); > > In most cases, that works fine. However, if someone has a last name such as > "O'Donnell", then the generated $USER_NAME will equal ko'donne when I would > rather have it be kodonnel. How do I get it to ignore the ' character in > the last name when generating a user name? > > > Thanks, > > Rohan :-) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#10016) next »