Jay,
> Here is a little more of the larger function with comments (more
> comments than code, which is never a Bad Thing [tm]). I am only showing
> the handling for two basic types of telephone numbers with explanation
> for additional verification which we would typically use, since we have
> tho
[snip]
> [stuff you may not need]
> This is a boiled down version of a longer function that counts string
> lengths to determine how many dashes might need to be added. Let's say
> you have the area code in the number, like 2108765432. Being a ten
digit
> number with a recognizable area code we can
Good stuff.
> [stuff you may not need]
> This is a boiled down version of a longer function that counts string
> lengths to determine how many dashes might need to be added. Let's say
> you have the area code in the number, like 2108765432. Being a ten digit
> number with a recognizable area code
Thanks!
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: April 16, 2004 7:33 AM
To: BOOT; [EMAIL PROTECTED]
Subject: RE: [PHP] Formatting phone numbers?
[snip]
Thanks for any help, even if you just suggest built in functions to look
at.
I'm looking for a w
On Thu, Apr 15, 2004 at 06:11:57PM -0400, John W. Holmes wrote:
> Rob Ellis wrote:
> >On Thu, Apr 15, 2004 at 04:31:09PM -0500, BOOT wrote:
> >>
> >>I'm looking for a way to take a 7 digit number and put it into xxx-
> >>format.
> >>
> >>So basically the logic is to count 3 characters into $num
[snip]
Thanks for any help, even if you just suggest built in functions to look
at.
I'm looking for a way to take a 7 digit number and put it into xxx-
format.
So basically the logic is to count 3 characters into $number and insert
a
"-" there.
[/snip]
As a telecom we use several methods, bu
Rob Ellis wrote:
On Thu, Apr 15, 2004 at 04:31:09PM -0500, BOOT wrote:
>>
I'm looking for a way to take a 7 digit number and put it into xxx-
format.
So basically the logic is to count 3 characters into $number and insert a
"-" there.
substr_replace($string, '-', 3, 0);
Won't that replace the n
On Thu, Apr 15, 2004 at 04:31:09PM -0500, BOOT wrote:
> Thanks for any help, even if you just suggest built in functions to look at.
>
> I'm looking for a way to take a 7 digit number and put it into xxx-
> format.
>
> So basically the logic is to count 3 characters into $number and insert a
Thanks for any help, even if you just suggest built in functions to look at.
I'm looking for a way to take a 7 digit number and put it into xxx-
format.
So basically the logic is to count 3 characters into $number and insert a
"-" there.
Thanks!
--
PHP General Mailing List (http://www.php
Corinne Shea wrote:
>Hi,
>
>I'd like to write a function that will take a string of characters and
>output it in a phone number format (xxx)xxx- and one for credit
>cards ---.
>
This is actually very easy to do if all you want to do is format,
meaning you have already valid
- Original Message -
From: "Corinne Shea" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 23, 2002 8:06 PM
Subject: [PHP] Formatting phone numbers
Hi,
I'd like to write a function that will take a string of characters and
output it in a phone n
Hi,
I'd like to write a function that will take a string of characters and
output it in a phone number format (xxx)xxx- and one for credit
cards ---. What I have below will currently remove
non-numeric characters from the string, but I'm not sure how to do the
rest of the
12 matches
Mail list logo