Re: String replace in php
| From: | Jason Wong | Date: | Fri, 23 Apr 2004 05:17:19 +0000 |
| Subject: | Re: String replace in php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184349@lists.php.net to get a copy of this message | ||
On Friday 23 April 2004 12:30, T UmaShankari wrote:
> I need to replace a character " with "\. Using php how to do this. i
> have given like this but it is giving parse error....
>
> $temps=str_replace('"','"\',$temp);
>
> Can anyone tell me how to do this ?
Try:
$temps = str_replace('"','"\\',$temp);
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I represent a sardine!!
*/