Re: Escape characters won't go away
| From: | Justin French | Date: | Mon, 02 Sep 2002 03:24:49 +0000 |
| Subject: | Re: Escape characters won't go away | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114868@lists.php.net to get a copy of this message | ||
on 02/09/02 1:14 PM, Mike Mannakee (mike@basementideas.com) wrote:
> I'm getting multiple backslashes in data I get out of a mysql database.
>
> Example :
>
> ...Here\\\'s the d...
>
> No problem. Except I CANT GET RID OF THEM. I've tried several things:
>
> 1. $string = stripslashes($string); - Doesn't do anything
have you tried:
$string = stripslashes(stripslashes($string));
// OR
$string = stripslashes(stripslashes(stripslashes($string)));
For multiple occurrences, you have to call it twice... or even three times.
also try
$string = str_replace("\'", "", $string);
$string = str_replace("\\", "", $string);
Justin French