Page 1 of 1

Stripping out speech marks

Posted: Fri May 30, 2003 7:49 am
by Deddog
Hello,
i need to strip out speech marks but i'm having no luck.

Below are my PHP attemtps:

1. $New = mysql_escape_string(str_replace('("&quot', ''', $New));

2. $New = mysql_escape_string(str_replace('"', ''', $New));

3. $speech = """;
$InitSpeech = "'";
$New = str_replace($speech, $InitSpeech, $New));

4. $speech = "\"";
$InitSpeech = "''";
$New = str_replace($speech, $InitSpeech, $New));

Any Idea's??

Cheers,

Deddog.

and there's more

Posted: Fri May 30, 2003 8:07 am
by Deddog
Attempt one should be
1. $New = mysql_escape_string(str_replace('&quot', ''', $New));

Also,
how can i strip out carriage returns "Enters" ?