title: XML declaration not playing nice with PHP
body: <p>I'm using PHP to output custom XML based upon values stored in a MySQL database. I have the following at the start of the condition:</p>
  
  <pre><code>echo '&lt;?xml version="1.0" encoding="UTF-8"?&gt;';
  </code></pre>
  
  <p>(I've also tried this variation:</p>
  
  <pre><code>echo "&lt;?xml version='1.0' encoding='UTF-8'?&gt;";
  </code></pre>
  
  <p>to no avail.)</p>
  
  <p>However, this is always outputted (in every browser and even when viewed as a downloaded file from <code>wget</code>) as:</p>
  
  <pre><code>&lt;?xml version=1.0 encoding=UTF-8 ?&gt;
  </code></pre>
  
  <p>Somewhere along the line, the single quotes around the version number and encoding got dropped. Where did I go wrong and what can I do to fix this? I'm getting errors from my parser and I believe it's because this declaration is not following the XML standard of having either single or double quotes around these values.</p>