title: How do I get PHP to echo XML tags?
body: <p>I'm working on a site that has about 3,000-4,000 dynamically generated pages, and I'm looking to update the XML sitemap.  I've tried using online generators in the past, and they never seem to capture all the pages correctly, so I was just going to do something myself.  Basically I have something like:</p>
  
  <pre><code>&lt;?php
  require('includes/connect.php');
  $stmt = $mysqli-&gt;prepare("SELECT * FROM db_table ORDER BY column ASC");
  $stmt-&gt;execute();
  $stmt-&gt;bind_result($item1, $item2, $item3);
  while($row = $stmt-&gt;fetch()) {
      echo '&lt;url&gt;&lt;br /&gt;
      &lt;loc&gt;http://www.example.com/section/'.$item1.'/'.$item2.'/'.$item3.'&lt;/loc&gt;
      &lt;br /&gt;
      &lt;lastmod&gt;2012-03-15&lt;/lastmod&gt;
      &lt;br /&gt;
      &lt;changefreq&gt;monthly&lt;/changefreq&gt;
      &lt;br /&gt;
      &lt;/url&gt;
      &lt;br /&gt;
      &lt;br /&gt;';
  }
  $stmt-&gt;close();
  $mysqli-&gt;close();
  ?&gt;
  </code></pre>
  
  <p>Now short of having PHP write it to a text file, is there a way that I can force it to echo the actual XML tags (I just want to copy and paste it into my sitemap file)?</p>