php 双引号中显示双引号

SQL语句:<input type="text" name= "content" style="width:500px" value="delete from `表名` where 字段1=\"条件1\" and 字段2=\"条件2\"..." />

显示结果:delete from `表名` where 字段1=\

不是已经转义了吗?求解释!

第1个回答  2013-01-16
那个是在php的<??>代码中才有效,你这串代码是html的,html用“代表双引号
<input type="text" name= "content" style="width:500px" value="delete from `表名` where 字段1=“条件1“ and 字段2=“条件2“ " />追问

“条件1“ and 字段2=“条件2“ 这一段没显示

追答

& quot ;去掉空格,第一次回答忘记加空格直接被浏览器显示成双引号

本回答被提问者和网友采纳
第2个回答  2013-01-16
input 的value 属性就是input输入框中的值,是字符串。怎么能转义呢,都没经过php。转义是php的功能。追问

啊哦,对哦,那应该怎么显示双引号啊?

追答

& quot ; 连起来写 用实体字符。

第3个回答  2013-01-16
<input type="text" name= "content" style="width:500px" value="delete from `表名` where 字段1=“条件1“ and 字段2=“条件2“ " />
相似回答