Home > Backend Development > PHP Tutorial > 单引号里面的某些转义字符不会生效么?

单引号里面的某些转义字符不会生效么?

WBOY
Release: 2016-06-23 14:05:37
Original
1154 people have browsed it

刚才试了一下,貌似单引号里的转义字符只有\'是有效的,\"和\n都不会转义。


回复讨论(解决方案)

正确
单引号中只有单引号需要转义

正确
单引号中只有单引号需要转义
百度搜PHP中单引号也双引号的区别第一个结果里就说明了。之前点百度知道里去了,只看到了变量那个,手贱啊,以后这类问题绝对不能到百度知道上搜了。

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