Код: Выделить всё
$myArr = [
['122-33-2222'],
['(122) 433-5555'],
['122 644.8888']
];
Код: Выделить всё
$findNumber = 122.433.5555;
$varPhone = preg_replace("/[^0-9,.]/", "", $findNumber);
foreach ($myArr AS $phone) {
if (preg_replace("/[^0-9,.]/", "", $phone) == $varPhone) {
echo "found";
} else {
echo "not found";
}
}
Подробнее здесь: https://stackoverflow.com/questions/471 ... -interfere
Мобильная версия