title: 'PCDATA invalid Char value' on RSS Script
body: <p>I'm using the following script to read an external RSS feed and output news on a website I'm working on:</p>
  
  <pre><code>&lt;?php
      $rss = new DOMDocument();
      $rss-&gt;load('http://www.somewebsite.com/news/rss.xml');
      $feed = array();
  
      foreach ($rss-&gt;getElementsByTagName('item') as $node) {
              $item = array (
                  'title' =&gt; $node-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;nodeValue,
                  'desc' =&gt; $node-&gt;getElementsByTagName('description')-&gt;item(0)-&gt;nodeValue,
                  'link' =&gt; $node-&gt;getElementsByTagName('link')-&gt;item(0)-&gt;nodeValue,
                  'date' =&gt; $node-&gt;getElementsByTagName('pubDate')-&gt;item(0)-&gt;nodeValue,
              );
              array_push($feed, $item);
          }
  
      $limit = 8;
      $count = 1;
  ?&gt;
  
  &lt;?php for ($x=0;$x&lt;$limit;$x++) : ?&gt;
  
      &lt;?php
  
          $title = str_replace(' &amp; ', ' &amp;amp; ', $feed[$x]['title']);
          $link = $feed[$x]['link'];
          $description = $feed[$x]['desc'];
          $date = date('l F d, Y', strtotime($feed[$x]['date']));
      ?&gt;
  
      &lt;section class="grid_3"&gt;
          &lt;div class="content"&gt;
  
              &lt;span class="date"&gt;&lt;a href="&lt;?php echo $link; ?&gt;"&gt;&lt;?php echo $date; ?&gt;&lt;/a&gt;&lt;/span&gt;
              &lt;h6&gt;&lt;a href="&lt;?php echo $link; ?&gt;"&gt;&lt;?php echo $title; ?&gt;&lt;/a&gt;&lt;/h6&gt;
  
          &lt;/div&gt;
      &lt;/section&gt;
  
      &lt;?php $count ++; ?&gt;
  
  &lt;?php endfor; ?&gt;
  </code></pre>
  
  <p>It worked fine the other day, but now I've had another look it's bringing up a load of errors along the lines of:</p>
  
  <blockquote>
    <p>Warning: DOMDocument::load() [domdocument.load]: PCDATA invalid Char value 31</p>
  </blockquote>
  
  <p>As well as this, the dates of the posts are showing up as </p>
  
  <blockquote>
    <p>Thursday January 01, 1970</p>
  </blockquote>
  
  <p>Does anyone know what might be wrong? Could this be something to do with the external RSS feed? That still looks fine when viewed in my browser though</p>