Download CSV

if(isset($_REQUEST['downloadCsv']) && $_REQUEST['downloadCsv'] !=""){
	ob_clean();	
	$filename 	= "myFile.csv";
	header('Content-type: application/csv');
	header('Content-Disposition: attachment; filename='.$filename);
	echo $output;
	exit;	
}

Leave a Reply

Your email address will not be published. Required fields are marked *