АШ
Size: a a a
АШ
СГ
СГ
СГ
СГ
АШ
СГ
СГ
АШ
СГ
СГ
СГ
АШ
СГ
СГ
contact-phones
@CODE: <a href="tel:[[+phone:tel_phone]]">[[+phone]]</a>
// красиво выводим номер телефона
function getCoolPhone($ph) {
$result = '+7 ('.substr($ph, 0, 3).') '.substr($ph, 3, 3).'-'.substr($ph, 6, 2).'-'.substr($ph, 8, 2);
return $result;
}
СГ
СГ
function clear_phone($phone) {
$bad_simbol = array("8 (", "+7(", "+7 (", "8(", "(", ")", "-", "_", " ", "+7", "*");
$result = str_replace($bad_simbol, "", $phone);
$result = preg_replace("/[^,.0-9]/", '', $result);
$result = substr($result, -10);
return $result;
}
S
function clear_phone($phone) {
$bad_simbol = array("8 (", "+7(", "+7 (", "8(", "(", ")", "-", "_", " ", "+7", "*");
$result = str_replace($bad_simbol, "", $phone);
$result = preg_replace("/[^,.0-9]/", '', $result);
$result = substr($result, -10);
return $result;
}
EG
preg_replace('~[^\d]~', '', $tel)
СГ