can't make str_replace work with single quote
| From: | DomIntCom | Date: | Mon, 24 Mar 2003 18:17:01 +0000 |
| Subject: | can't make str_replace work with single quote | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140867@lists.php.net to get a copy of this message | ||
this should be pretty straight forward, but I cannot make this work for some
reason.
$ndate = str_replace("'",'', "'2003-1;1 00:00:01' AND
'2003-3-1 23:59:59'");
to extrapolate we have the following string surrounded by double quotes;
'2003-1;1 00:00:01' AND '2003-3-1 23:59:59'
now - I have even tried the following command and the replace would not take
place;
str_replace('2003','2002', "'2003-1;1 00:00:01' AND
'2003-3-1 23:59:59'");
the search & replace would not work. I've tried ereg_replace and
preg_replace, and I get the same results.