Home > Backend Development > PHP Tutorial > 一个很奇怪的PHP有关问题

一个很奇怪的PHP有关问题

WBOY
Release: 2016-06-13 11:34:58
Original
1012 people have browsed it

一个很奇怪的PHP问题
我要把$one_news里面的content字段的双引号替换为单引号,然后赋给$news[content],但是发生了很奇怪的问题,如下:

				<br />//这样可以<br />$one_news['content']=str_replace('"','\'',$one_news['content']);<br />$news[content]=$one_news['content'];<br />//下面的这样子就替换不掉双引号,为什么呢?<br />//$news[content]=str_replace('"','\'',$one_news['content']);<br />
Copy after login
Copy after login

PHP

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