I have the below string:
$string = 005390326548;
How can i get this result?
0053****6548
Basically i want to replace starting from the 4 characters the next 4 characters by ****
I have the below string:
$string = 005390326548;
How can i get this result?
0053****6548
Basically i want to replace starting from the 4 characters the next 4 characters by ****
$string = '005390326548';
$retult = substr($string, 0, 4) . '****' . substr($string, 8);
one-liner solution.
$string= substr_replace("8487013103", "****", 4, 4);
echo $string;