title: RSS Feed using Codeigniter
body: <p>I create an RSS Feed using Codeigniter following tutorials from <a href="http://code.tutsplus.com/tutorials/build-an-rss-20-feed-with-codeigniter--net-7811" rel="nofollow">here</a></p>
  
  <p>but my problem is the feed content is not displaying on the page but available if you browse the html source.</p>
  
  <p>here is my controller code:</p>
  
  <pre><code>public function __construct()
  {
      parent::__construct();        
      $this-&gt;load-&gt;model('articles_model');
      $this-&gt;load-&gt;helper('xml');
      $this-&gt;load-&gt;helper('text');
  }
  
  public function index()
  {
      $data['feed_name'] = 'MyDebut.ph'; 
      $data['encoding'] = 'utf-8'; 
      $data['feed_url'] = 'http://www.mydebut.com/feeds'; 
      $data['page_description'] = 'Everything for turning 18.'; 
      $data['page_language'] = 'en-en'; 
      $data['creator_email'] = 'mydebutph@gmail.com'; 
      $data['posts'] = $this-&gt;articles_model-&gt;getArticlesPaginated(0,30); 
  
  
      header("Content-type: text/xml; charset=utf-8");
  
      $this-&gt;load-&gt;view('rss', $data);
  }
  </code></pre>
  
  <p>my view code:</p>
  
  <pre><code>    &lt;?php echo '&lt;?xml version="1.0" encoding="' . $encoding . '"?&gt;' . "\n"; ?&gt;
  &lt;rss version="2.0"&gt;
      &lt;channel&gt;
          &lt;title&gt;&lt;?php echo $feed_name; ?&gt;&lt;/title&gt;
          &lt;description&gt;&lt;?php echo $page_description; ?&gt;&lt;/description&gt;
          &lt;link&gt;&lt;?php echo $feed_url; ?&gt;&lt;/link&gt;
              &lt;?php foreach ($posts as $post): ?&gt;
              &lt;item&gt;
                &lt;title&gt;&lt;?php echo xml_convert($post['art_title']); ?&gt;&lt;/title&gt;
                &lt;link&gt;&lt;?php echo base_url().'blogs/'.$post['sec_slug'].'/'.$post['cat_slug'].'/'.$post['art_slug'];?&gt;
                &lt;description&gt;&lt;?php echo character_limiter($post['art_sub'], 300); ?&gt;&lt;/description&gt;
              &lt;/item&gt;
          &lt;?php endforeach; ?&gt;
      &lt;/channel&gt;
  &lt;/rss&gt;
  </code></pre>