RE: [PHP] NEWBIE - How do you strip spaces?
| From: | Johnson, Kirk | Date: | Tue, 03 Jul 2001 16:48:25 +0000 |
| Subject: | RE: [PHP] NEWBIE - How do you strip spaces? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-56015@lists.php.net to get a copy of this message | ||
ereg_replace("[^0-9]", "", $var)
Kirk
> -----Original Message-----
> From: Craig Simon [mailto:Craig.Simon@Mobileum.com]
> Sent: Tuesday, July 03, 2001 10:44 AM
> To: 'php-general@lists.php.net'
> Subject: [PHP] NEWBIE - How do you strip spaces?
>
>
> I am trying to figure out how to take a phone number as an
> array element,
> and strip out the spaces and parenthesis and just return the
> numerals. IE
> (555) 555-1212 to 5555551212.
>
> I would appreciate any assistance.
>
> Thanks
> Craig
>
>
> Craig Simon Senior Systems Engineer
> Mobileum Inc.
> 4234 Hacienda Drive, Pleasanton Ca 94588
> (O) 925-251-7269 (C) 925-487-6005
>
>