<?php
$csv_file = "csv_export_".date('Ymd') . ".csv";
header("Content-Type: text/csv");
header("Content-Disposition: attachment; filename=\"$csv_file\"");
$out = fopen('php://output', 'w');
$list=array('Name','LastName', 'Age' 'Address', 'state');
fputcsv($out, $list);
fclose($out);
?>
http://php.net/manual/en/function.fputcsv.php
http://www.phpzag.com/create-a-csv-file-using-phpmysql/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+phpzag+%28PHP+Tutorial%29
No hay comentarios:
Publicar un comentario