Re: how do you erase quotes from variable?
| From: | Rasmus Lerdorf | Date: | Wed, 24 Jan 2001 23:01:51 +0000 |
| Subject: | Re: how do you erase quotes from variable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36515@lists.php.net to get a copy of this message | ||
> I have a variable(s) that hold the string:
>
> "name"
>
> and I'd like to kill the quotes so it contains:
>
> name
$new = str_replace('"','',$old);
Using a regex as others have suggested is a bad idea for something this
trivial.
-Rasmus