Answer the question
In order to leave comments, you need to log in
How to edge phones through preg_match_all tags?
I can’t understand what’s wrong, I’m trying to parse the phones line by line:
preg_match_all("/^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/", "+7(495)000-00-00 +7(925)0000000", $phones, PREG_SET_ORDER);
foreach ($phones as $val) {
echo "телефон: " . $val[0] . "\n";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question