user591368
user591368

Reputation:

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?

Upvotes: 3

Views: 1045

Answers (1)

Aaron Hathaway
Aaron Hathaway

Reputation: 4315

Take a look at htmlentities()

Upvotes: 4

Related Questions