<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Comments on snippet: 'CSV Reports'</title>
    <description>Snipplr comments feed</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 10:36:05 +0000</lastBuildDate>
    <item>
      <title>rodrigo said on 09/Aug/2008</title>
      <link>https://snipplr.com/view/7790/csv-reports</link>
      <description>&lt;p&gt;Real world usage:&#13;
&#13;
#php&#13;
&#13;
...&#13;
&#13;
header('Content-type: text/csv');&#13;
header('Content-disposition: attachment; filename="report_'.$this-&gt;person-&gt;name.'.csv"');&#13;
&#13;
$historic = $this-&gt;reports-&gt;get_historic($person-&gt;id, Utils::get_date()); // Get historic resultset view from DB where date is provided by helper Utils method get_date();&#13;
&#13;
print Reports::csv($historic);&lt;/p&gt;</description>
      <pubDate>Sat, 09 Aug 2008 16:40:20 UTC</pubDate>
      <guid>https://snipplr.com/view/7790/csv-reports</guid>
    </item>
    <item>
      <title>rodrigo said on 14/Aug/2008</title>
      <link>https://snipplr.com/view/7790/csv-reports</link>
      <description>&lt;p&gt;Actually you should replace if($title) echo $title."\n"; for something like if($title) $output = $title."\n"; and instead of return implode... $output .= implode... and then return all together.&lt;/p&gt;</description>
      <pubDate>Thu, 14 Aug 2008 03:48:41 UTC</pubDate>
      <guid>https://snipplr.com/view/7790/csv-reports</guid>
    </item>
  </channel>
</rss>
