Home  >  Article  >  Backend Development  >  Use substr_replace in PHP to replace characters between two specified positions with *_PHP Tutorial

Use substr_replace in PHP to replace characters between two specified positions with *_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:32:331080browse

Copy code The code is as follows:

$username = "zongzi";
echo substr_replace($username,'**', '1','2');

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322794.htmlTechArticleCopy the code as follows: $username = "zongzi"; echo substr_replace($username,'**',' 1','2');...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn