Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to mask phone number in php

$data = '+11234567890';

if(  preg_match( '/^+d(d{3})(d{3})(d{4})$/', $data,  $matches ) )
{
    $result = $matches[1] . '-' .$matches[2] . '-' . $matches[3];
    return $result;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mask #phone #number #php
ADD COMMENT
Topic
Name
5+7 =