header("Content-type:text/octect-stream");
header("Content-Disposition:at tachment;filename=data.csv");
$recordlist = $this->db->query("SELECT * FROM `table` ");
foreach($recordlist ->resu lt_array() as $row)
{
print '"' . stripslashes(implode('","',$ro w)) . "\"\n";
}
exit;
$recordlist = $this->db->query("SELECT * FROM `table` ");
foreach($recordlist ->resu
{
print '"' . stripslashes(implode('","',$ro
}
exit;