Answer the question
In order to leave comments, you need to log in
How to replace part of a string with asterisks?
Good day
How can I replace part of the text in a string with asterisks?
For example
qwerty*****zxcvbn1234
Answer the question
In order to leave comments, you need to log in
$original = '1234567890';
echo substr_replace($original, '***', 3, 3);
//output: 123***7890
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question