question
| From: | Jos Elkink | Date: | Mon, 16 Dec 2002 16:39:50 +0000 |
| Subject: | question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-128421@lists.php.net to get a copy of this message | ||
Hi all,
I've got a question about the echo function. If I have a variable (string)
with a
in it, and I use echo, the output is \ instead. This I use this
in a form (if people fill in the form incorrectly, they get the form
again, with the values they entered filled in) and it looks rather weird
when a ' used in a textline becomes a \` when they get the form again. (In
between, I have $comment = preg_replace ("[\']","`",$comment).) Besides,
when they resubmit the form, the \ is kept and when they get the form for
the third time, it thus becomes \\` - kind of messy :) ... So, what do I
do? Is there a way I can use echo without having it translate to \? And
what do other people do to replace ' in strings (I can't have them because
I use mySQL to store the data).
Thanks in advance for any responses ...
Jos