RE: [PHP-WIN] checking phone number
| From: | Asendorf, John | Date: | Wed, 20 Dec 2000 21:09:29 +0000 |
| Subject: | RE: [PHP-WIN] checking phone number | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4564@lists.php.net to get a copy of this message | ||
ooops... wrong line that I was testing....
$CheckPhone = preg_replace("/[-\.\(\)\/\s]/", "", $phone);
Either this one or the other one will both work, but this one is more
readable....
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.
> -----Original Message-----
> From: Asendorf, John [mailto:JAsendorf@lcounty.com]
> Sent: Wednesday, December 20, 2000 4:04 PM
> To: afan; php-windows@lists.php.net
> Subject: RE: [PHP-WIN] checking phone number
>
>
> Give this line a quick try
>
> $CheckPhone = ereg_replace("[-\.\(\)\/ ]", "", $phone);
>
>
> ---------------------
> John Asendorf - jasendorf@lcounty.com
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
>
> The benefit to the government of replacing all $1 Federal
> Reserve notes with
> $1 coins would be $522.2 million per year, according to
> estimates of the
> General Accouting Office released on April 7, 2000.
>
>
>
>
>
> > $CheckPhone = ereg_replace(" ", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\(", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\)", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\-", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\/", "", $CheckPhone);
>
> ---------------------
> John Asendorf - jasendorf@lcounty.com
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
>
> The benefit to the government of replacing all $1 Federal
> Reserve notes with
> $1 coins would be $522.2 million per year, according to
> estimates of the
> General Accouting Office released on April 7, 2000.
>
>
> > -----Original Message-----
> > From: afan [mailto:afan@sprout.net]
> > Sent: Wednesday, December 20, 2000 6:40 PM
> > To: php-windows@lists.php.net
> > Subject: [PHP-WIN] checking phone number
> >
> >
> > Hi all,
> > First I want to wish to everybody Happy holydays!
> >
> > I have to check does submitted phone number already exist in
> > database. I just wrote this:
> > $CheckPhone = ereg_replace("\.", "", $Phone);
> > $CheckPhone = ereg_replace(" ", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\(", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\)", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\-", "", $CheckPhone);
> > $CheckPhone = ereg_replace("\/", "", $CheckPhone);
> >
> > and it works fine!
> > But, probably there is something simpler, better and shorter.
> > Anybody have an idea?
> >
> > Afan
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>