note 110626 rejected from function.str-replace by aharvey
| From: | aharvey@php.net | Date: | Thu, 15 Nov 2012 00:23:20 +0000 |
| Subject: | note 110626 rejected from function.str-replace by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191992@lists.php.net to get a copy of this message | ||
Note Submitter: narenjaz at gmail dot com
----
$SourceFilePath = 'D:\Desktop\EN_US.xml';
$ToXmlSourceString = file_get_contents($SourceFilePath);
$ReplacePatterns = array("<b>");
$ReplacePatternWith = array("<![CDATA[<b>]]>");
$bodytag = str_replace($ReplacePatterns,$ReplacePatternWith,$ToXmlSourceString,$Count);
echo $bodytag;
echo $Count;
$DestPath = 'D:\Desktop\en.xml';
file_put_contents($DestPath, $bodytag);
**** The problem is, the <b> are not getting replaced with
<![CDATA[<b>]]>") string. Can some one help please.