title: Saving to an xml file - unterminated entity reference error
body: <p>I'm trying to save text to an xml file but if I use certain characters  like for example the "<strong>&amp;</strong>" symbol... I get the following error (<em>below</em>) </p>
  
  <pre><code>Warning: main(): unterminated entity reference
  </code></pre>
  
  <p><br>What's the deal with this? If anyone could help, I would really appreciate it!</p>
  
  <p><br>
  <strong>Here is my code:</strong></p>
  
  <pre><code>if (get_magic_quotes_gpc()) {
      function magicQuotes_awStripslashes(&amp;$value, $key) {$value = stripslashes($value);}
      $gpc = array(&amp;$_GET, &amp;$_POST, &amp;$_COOKIE, &amp;$_REQUEST);
      array_walk_recursive($gpc, 'magicQuotes_awStripslashes');
  }
  
  
  
  $new_input = $_POST['userInput']; 
  // echo $new_input;
  
  $doc = new DOMDocument( );
  
  $edit = $doc-&gt;createElement( 'edit' );
  $edit-&gt;nodeValue = $new_input;
  
  $doc-&gt;appendChild($edit);
  $doc-&gt;save('../text.xml');
  </code></pre>