note 15183 added to function.ereg-replace
| From: | rodzilla at rigbees dot com | Date: | Thu, 30 Aug 2001 20:10:51 +0000 |
| Subject: | note 15183 added to function.ereg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17394@lists.php.net to get a copy of this message | ||
Here we have $email_body being sent as an email that will include single and double quotes being
escaped with \'s UNLESS we do the following.
// Escape single quotes
$email_body = ereg_replace ('\\\\\'', '\'', $email_body);
// Just to clear up the confusion, make your double quote string a variable.
$quot = '\\\"';
// Ah, now we can replace \" with "
$email_body = ereg_replace ($quot, '"', $email_body);
http://www.php.net/manual/en/function.ereg-replace.php