-1

Let's say I have the phone number 0501234555 for which I want to put some * sign on some places. I want that my number should be in this form 050*****55. I want to do this in php.

Can anyone please suggest how to do it? Thanks.

Ismael
  • 2,995
  • 29
  • 45
Neeraj Sharma
  • 346
  • 1
  • 4
  • 16

1 Answers1

0

Please try with below code if its solve your problem

$number = '0501234555'; 
echo  substr_replace($number,'*****',3,5); // 050*****55
shubhangee
  • 529
  • 3
  • 10