I have a phone field and the way I want to store in the database is just digits.
example: 4154065623
I need a regular expression that will remove spaces/dashes/etc
so for example if a user puts something like
(415)406-56 23 it will turn it into 4154065623
using ereg_replace function I am guessing...
EDIT:
never mind.. I have figured it out on my own
$phone = ereg_replace ('[^0-9]', '' , $phone);
example: 4154065623
I need a regular expression that will remove spaces/dashes/etc
so for example if a user puts something like
(415)406-56 23 it will turn it into 4154065623
using ereg_replace function I am guessing...
EDIT:
never mind.. I have figured it out on my own
$phone = ereg_replace ('[^0-9]', '' , $phone);