<?php $xml_header = "<?xml version='1.0' encoding='utf-8'?><xml/>"; $xml = new SimpleXMLElement($xml_header); $xml->addChild("first_string","this is &lt;mystring> &euro; &gt; $"); $xml->addChild("first_string2", "this is <mystring> € > $"); $xml->addChild("second_string",htmlentities("this is <mystring> € > $")); echo $xml->first_string . "\n"; echo $xml->first_string2 . "\n"; echo $xml->second_string;
You have javascript disabled. You will not be able to edit any code.