Stripping out speech marks

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Deddog
Forum Commoner
Posts: 55
Joined: Thu Sep 26, 2002 6:05 am
Location: Brighton

Stripping out speech marks

Post 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.
Deddog
Forum Commoner
Posts: 55
Joined: Thu Sep 26, 2002 6:05 am
Location: Brighton

and there's more

Post by Deddog »

Attempt one should be
1. $New = mysql_escape_string(str_replace('&quot', ''', $New));

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