take out dashes from telephone
Posted: Mon Jul 26, 2004 4:56 am
Hi all,
i have a field with mixed telephone formats i need to takeout the
- dashes
- any alpha characters
- align the number to the left with dashes and spaces taken out
how can i do this using preg_replace.
I tried this but it never worked
i have a field with mixed telephone formats i need to takeout the
- dashes
- any alpha characters
- align the number to the left with dashes and spaces taken out
how can i do this using preg_replace.
I tried this but it never worked
Code: Select all
<?php
preg_replace( "%[^0-9]%", "", $TELEPHONE );
?>