CDATA tags don't appear in XML file when saved

When sending an XML string which includes CDATA tags to the server, the
XML file is saved correctly but the CDATA tags disappear.

In the Flash movie I create a variable (xmlString) to which contains
some lines with CDATA tags, for example::

xmlString += " <material><mattext
texttype=‘text/html’><![CDATA["+currentString[j]+"]]></mattext></material>
";

I create an XML object and send the string to a PHP script on the
server:

    addActivity = new XML(xmlString); 
    addActivity.contentType = "text/xml"; 
    addActivity.ignoreWhite = true; 
    addActivity.sendAndLoad("addActivity.php", moXML); 

The PHP script looks like this:

<?php
$my_xml = $GLOBALS[“HTTP_RAW_POST_DATA”];
$xml_output = simplexml_load_string($my_xml);
$filename=$xml_output->filename;
$handle= fopen($filename,‘w’);
fwrite($handle, “$HTTP_RAW_POST_DATA”);
fclose($handle);
echo $my_xml;
?>

The file is saved but the CDATA tags disappear. Any ideas as to why this
is happening? Any help would be appreciated.

Birgit