<input type=button value="Show Answer" name="btnShowAnswer" onClick="alert('<?php echo $currentanswer ?>') "></p>
I am trying to pop up a message box that displays the answer
to a question on my website...
Here is my problem..
Say for example the answer has an apostrophe in it...
Answer: Netooio's item
Then I have a problem displaying the alert box because it wraps the textstring in single quotes also... so on my html it would end up being
<input type=button value="Show Answer" name="btnShowAnswer" onClick="alert('Netooio's item') "></p>
see the problem?? the apostrophe cuts off the single quote before the end of the string... How can I get around this..
I'm sure there must be an easy way like using a slash in from of the quote or something like that but i just dont know the syntax.
Thanks to whoever can help me out.