Actual I have one problem. I want to append something to string in CDATA format in a XML file.
<url><![CDATA[http://www.kinguin.net/category/1356/l-a-noire-steam-key/?nosalesbooster=1&country_store=1¤cy=EUR]]</url>
After I modify the string with this code:
$doc = simplexml_import_dom($dom);
$items = $doc->xpath('//url');
foreach ($items as $item) {
$node = dom_import_simplexml($item);
$node->textContent .= 'appendIT';
}
I get:
<url>http://www.kinguin.net/category/1356/l-a-noire-steam-key/?nosalesbooster=1&country_store=1&currency=EURappendIT]]</url>
But how can I say "Put it back into the CDATA format"?
And in addition. I want to send this url to my database. But without the &
char. So how can I get the url without the &
?
Greetings and Thank You!