ereg_replace("[^0-9]", "", $var)
Kirk
> -----Original Message-----
> From: Craig Simon [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 03, 2001 10:44 AM
> To: '[EMAIL PROTECTED]'
> 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
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]