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

Use substr_replace in PHP to replace characters between two specified positions with symbols

PHP中文网
Release: 2016-07-29 08:44:22
Original
1190 people have browsed it

Copy the code The code is as follows:


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

The above introduces the use of substr_replace in PHP Replace the characters between the two specified positions with numbers, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template