note 45538 added to function.chr
| From: | me at truceco dot com | Date: | Fri, 10 Sep 2004 01:34:41 +0000 |
| Subject: | note 45538 added to function.chr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76368@lists.php.net to get a copy of this message | ||
I was pulling data from a textarea field on a form to email to myself in php when I noticed that if
the user typed in " or ' the message would automatically add a \ before them. When I got
my email it would look something like this:
The book, \"A wrinkle in time\" wasn\'t any good.
To fix this, I simply did this:
$message = srt_replace(chr(92), "", $message);
Hope it helps someone!!!
----
Manual Page -- http://www.php.net/manual/en/function.chr.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45538
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45538&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45538&report=yes
Search -- http://master.php.net/manage/user-notes.php