RE: [PHP-GENERAL] Remove double quotes from string
| From: | Spallek, Heiko | Date: | Tue, 16 May 2000 19:31:24 +0000 |
| Subject: | RE: [PHP-GENERAL] Remove double quotes from string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117@lists.php.net to get a copy of this message | ||
Hi Steff,
> replace the string delimiting quotes (") by single quotes (')
> and try the following modification of your statements:
>
> $quoteText = strtr($quoteText, '"', ' ');
> $quoteText = str_replace('"', ' ', $quoteText);
>
> In general ' and " quotes have exactly the same meaning. But
> be aware of the problems that could araise. Take notice of
> the execution precedence of php, javascript/html and so on...
Thanks a lot!
When I use it, however, both translate the content of a input text box from
an HTML form which contains
"Nothing is ..."
into
\Nothing is ...\
which I don't like. I need the string just plain without the '\'.
Any idea?
Heiko