I can't change the variable because this is how I receive it from a mail server using IMAP.
$sender = '"Smith, John"';
This is my html:
<td>To:</td>
<td><input name="To" id="to" type="text" size="80" onfocus="changeBg('to','#FFF')"
value= <?php echo $sender; ?> /></td>
this is the output I get:
To: Smith,John />
How can I escape the " " or what should I do to remove the "/>" at the end of the output? I've tried every example I found on the net and nothing works. Can please anyone give me help?
I want the text just to be in the input text box like this:
To: Smith, John
Thanks in advance.
EDIT:
When I try the following it works, but the input is not closed at the end(/>)
<td><input name="To" id="to" type="text" size="80" onfocus="changeBg('to','#FFF')"
<?php echo 'value='.$sender; ?>" </td>