title: add CDATA to xml node
body: <p>This php code works correctly, but how do I add CDATA to content node?</p>
  
  <pre><code> &lt;?php
   $xml = new DomDocument("1.0", "UTF-8");
   $xml-&gt;load('xmldata.xml');
  
   $title    = $_POST['title'];
   $avtor    = $_POST['avtor'];
   $date     = $_POST['date'];
   $category = $_POST['category'];
   $content  = $_POST['content'];
  
  $rootTag = $xml-&gt;getElementsByTagName("root")-&gt;item(0);
  
     $postingTag = $xml-&gt;createElement("posting");
  
       $titleTag    = $xml-&gt;createElement("title",    $title);
       $avtorTag    = $xml-&gt;createElement("avtor",    $avtor);
       $dateTag     = $xml-&gt;createElement("date",     $date);
       $categoryTag = $xml-&gt;createElement("category", $category);
       $contentTag  = $xml-&gt;createElement("content",  $content);
  
       $postingTag-&gt;appendChild($titleTag);
       $postingTag-&gt;appendChild($avtorTag);
       $postingTag-&gt;appendChild($dateTag);
       $postingTag-&gt;appendChild($categoryTag);
       $postingTag-&gt;appendChild($contentTag);
  
     $rootTag-&gt;appendChild($postingTag);
  
  $xml-&gt;formatOutput = true;
  $xml-&gt;save('xmldata.xml');
  </code></pre>