Home  >  Article  >  Backend Development  >  str_replace问题

str_replace问题

WBOY
WBOYOriginal
2016-06-23 13:44:371013browse


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


回复讨论(解决方案)

$str='$abc';echo str_replace('a','b',$str);

$bbc

$str是从数据库取出来的,已经是双引号的了,

不会解析的!

你举例看看

是我自己看错了,sorry,结贴

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
Previous article:PHP 数组 (前篇) 遍历Next article:PHP协程初体验