Home >Backend Development >PHP Tutorial >str_replace有关问题

str_replace有关问题

WBOY
WBOYOriginal
2016-06-13 12:10:23810browse

str_replace问题

str_replace("a","b",$str);
当$str里有符号$时,系统会将$解析,我想不解析,请问如何做呢
------解决思路----------------------

<br />$str='$abc';<br />echo str_replace('a','b',$str);<br />

<br />$bbc<br />

------解决思路----------------------
不会解析的!

你举例看看

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