Re: replacing literal " in string

From: Date: Thu, 26 Sep 2002 02:30:31 +0000
Subject: Re: replacing literal " in string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-117665@lists.php.net to get a copy of this message
Hi, Thursday, September 26, 2002, 12:02:29 AM, you wrote: RM> Could somebody help me with the correct syntax for an ereg_replace to RM> replace literal occurences of the quote character in a string. I can't RM> seem to get it right. RM> In other words, I have a form input variable -- that literally may look RM> like this: "some_value", and I want it to literally look like this: RM> some_value. RM> I tried: RM> $key=str_replace ("\"", "", "$key"); RM> and other variations but can't get it to work. RM> What am I missing? RM> Thanks! try $key = str_replace('"', '', $key); -- regards, Tom

« previous php.general (#117665) next »