Search
 
SCRIPT & CODE EXAMPLE
 

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;
}
Comment

PREVIOUS NEXT
Code Example
Php :: laravel vue build production 
Php :: upload file in laravel 
Php :: php add to array in loop 
Php :: acf wp_query custom field 
Php :: php sql query where in array 
Php :: laravel blade variable isset, empty or optional 
Php :: php foreach 
Php :: laravel dump query 
Php :: flatten a multi-dimensional array into a single array in php 
Php :: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://vtl-lab.com/VN/crecc-cms/api/member/register.json. (Reason: CORS request did not succeed). 
Php :: remove whitespace from string php 
Php :: how to display user id from a function on a wordpress page 
Php :: uuid in laravel 
Php :: php search the key off bigger value 
Php :: create form request laravel 
Php :: php controller 
Php :: woocommerce get post meta 
Php :: migration create symfony 
Php :: check current pages is a child page wordpress 
Php :: php check if input is int 
Php :: hmtl remove tag php 
Php :: laravel insert timestamp now 
Php :: php connect to mysql 
Php :: update query in codeigniter using where condition 
Php :: get am pm 12 hour timee laravel 
Php :: laravel-ckeditor 
Php :: php days in month 
Php :: search post by post title in wordpres 
Php :: php get first word of string 
Php :: php flatten multidimensional array 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =