Home > Backend Development > PHP Tutorial > str_replace问题

str_replace问题

WBOY
Release: 2016-06-23 13:44:37
Original
1045 people have browsed it


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


回复讨论(解决方案)

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

$bbc
Copy after login

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

不会解析的!

你举例看看

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

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template