I want to replace with the 4~8 characters of a string with *,how to do it?
4~8
*
HelloWorld => Hell****ld
use
substr_replace()
like
substr_replace($string, '****', 4 , 4);
read more :
http://php.net/manual/en/function.substr-replace.php
1.4m articles
1.4m replys
5 comments
57.0k users