Here is how to add a CDATA section to an XML node in PHP. Assuming that $myxmlnode is your php variable representing an xml node, you will have to use dom import to add a CDATA section to that xml node. Here is the code snippet below for the same.

$dom=dom_import_simplexml($myxmlnode);
$dom->appendChild($dom->ownerDocument->createCDATASection("Add any text here"));

SocialTwist Tell-a-Friend

Knowledge is Power. You may also like:
Subscribe to HitXP: Be the first to read.
Articles Indian Music Notes Free Software Downloads Kannada