title: XML error at ampersand (&)
body: <p>I have a php file which prints an xml based on a MySql db.</p>
  
  <p>I get an error every time at exactly the point where there is an <strong>&amp;</strong> sign.</p>
  
  <p>Here is some php:</p>
  
  <pre><code>$query = mysql_query($sql);
  
  $_xmlrows = '';
  
  while ($row = mysql_fetch_array($query)) {
      $_xmlrows .= xmlrowtemplate($row);
  }
  
  function xmlrowtemplate($dbrow){
      return "&lt;AD&gt;
                &lt;CATEGORY&gt;".$dbrow['category']."&lt;/CATEGORY&gt;
              &lt;/AD&gt;
  }
  </code></pre>
  
  <p>The output is what I want, i.e. the file outputs the correct category, but still gives an error.</p>
  
  <p>The error says: <strong>xmlParseEntityRef: no name</strong></p>
  
  <p>And then it points to the exact character which is a <strong>&amp;</strong> sign.</p>
  
  <p>This complains only if the <code>$dbrow['category']</code> is something with an <strong>&amp;</strong> sign in it, for example: "<strong>cars &amp; trucks</strong>", or "<strong>computers &amp; telephones</strong>".</p>
  
  <p>Anybody know what the problem is?</p>
  
  <p>BTW: I have the encoding set to UTF-8 in all documents, as well as the xml output.</p>