I need a little help here. This code correctly displays every format I enter–except when it’s xxx.xxx.xxxx
It keeps the periods in! How do I filter out periods too?
preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "$1-$2-$3", $phone_enter)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to update the query so it will allow a . (dot), i added the
\.?which means, a dot may appear zero or one time.