javascript - How to solve double quote inside double quote syntax error -
i have project have php code, inside have echo html has javascript onclick function() accepts double-quotes. problem echo uses double-quote there's syntax error in code , i'm new php don't know how solve this.
here code:
echo " <span class = 'username'>".$row['username']."</span> <form name = 'matchcreator' class='amount' action='arena.php' method ='post'> <input name = 'm-maker' type = 'number' class='price' min='5' max='100' value='5'/> <div class = 'review'> <p>review</p> </div> <button id ='send' type = 'button' onclick="confirm.render('yes','no')">send challenge</button> </form> "; echo "<br>";
i know syntax error don't know how solve it. appreciated.
echo " <span class = 'username'>".$row['username']."</span> <form name = 'matchcreator' class='amount' action='arena.php' method ='post'> <input name = 'm-maker' type = 'number' class='price' min='5' max='100' value='5'/> <div class = 'review'> <p>review</p> </div> <button id ='send' type = 'button' onclick=\"confirm.render('yes','no')\">send challenge</button> </form> "; echo "<br>"; }
simply escaping \"
Comments
Post a Comment