title: How to properly add newlines to an XML string in PHP?
body: <p>I have some xml that I manually construct in a function that is something like:</p>
  
  <pre><code>$xml = "&lt;myxml&gt;";
  $xml .= "&lt;items&gt;";
  $xml .= "&lt;item1&gt;blah&lt;/item1&gt;";
  $xml .= "&lt;/items&gt;";
  $xml .= "&lt;/myxml&gt;";
  </code></pre>
  
  <p>When I output the string though I'd like the newlines to be present. How can I add this to the string without affecting a web service accepting the xml? Do newlines in XML even matter?</p>