RE: [PHP] again with the regex
| From: | Jerry Lake | Date: | Tue, 15 May 2001 23:05:15 +0000 |
| Subject: | RE: [PHP] again with the regex | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52959@lists.php.net to get a copy of this message | ||
Thanks folks, much better now.
Jerry Lake
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com
-----Original Message-----
From: Johnson, Kirk [mailto:kjohnson@zootweb.com]
Sent: Tuesday, May 15, 2001 3:52 PM
To: php-general@lists.php.net
Subject: RE: [PHP] again with the regex
Jerry, try sprintf(). Here's an example:
sprintf("(%s) %s-%s", substr($GLOBALS["appPhoneHome"], 0,
3),substr($GLOBALS["appPhoneHome"], 3, 3),substr($GLOBALS["appPhoneHome"],
6, 4))
Kirk
> -----Original Message-----
> From: Jerry Lake [mailto:jerryl@europa.com]
> Sent: Tuesday, May 15, 2001 4:48 PM
> To: php-general@lists.php.net
> Subject: [PHP] again with the regex
>
>
> I hate to keep asking regex stuff,
> but it is really evasive for me..
> I'm pulling phone numbers out of a DB
> in the format of 1234567890, I would
> like to format them like (123) 456-7890
> or something else that at least breaks them
> up a bit.
>
> any help is appreciated,
> Thanks,
>
> Jerry Lake
> Interface Engineering Technician
> Europa Communications - http://www.europa.com
> Pacifier Online - http://www.pacifier.com
>
>
> --
> 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
>
--
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