Quotation marks in value of html tag attribute problem

若如初见. 提交于 2019-11-28 09:26:14

问题


<?php    
$myname = 'my name have quotation marks " <- here';
?>

And i try to:

<input type="text" name="newnameproposition[<?php echo $myname ?>]">

And html have a little problem becouse of:

name="newnameproposition[my name have quotation marks " <- here]"

Can anybody had this kind of problem?


回答1:


Take a look at htmlentities()



来源:https://stackoverflow.com/questions/4939193/quotation-marks-in-value-of-html-tag-attribute-problem

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!