similar issue as a couple of days ago, different circumstance...
I am having trouble placing dynamic text with single and/or double quotes into an input box.
For example:
$myname = "John \"Babyface\" O'Mally";
$myname = stripslashes($myname);
echo "My Name: <input type=text name=myname value='".$myname."'>";
Because the value of $myname is more than 1 word it needs to be in quotes when output to the input field.
[ha]...output to the input field... that's funny...[/ha]
However, the slashes need to be stripped because it is a final output and is seen by the end-user...
Is there an easy way to do this without employing yet another language and making a whole new JavaScript var containing the output (or input, however you want to look at it)? Surely there's some kind of simple PHP/HTML syntax I'm missing to lessen the load of code...
Thanks in advance...