Quotation marks in value of html tag attribute problem
问题 <?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