Skip to content

Instantly share code, notes, and snippets.

@oswaldoacauan
Created September 6, 2013 12:50
Show Gist options
  • Save oswaldoacauan/6463338 to your computer and use it in GitHub Desktop.
Save oswaldoacauan/6463338 to your computer and use it in GitHub Desktop.
PHP - CSV Generator
<?php
$csvFile = fopen('teste.csv', 'w');
fwrite($csvFile, "sep=,\r\n");
foreach($arrData as $row) {
fputcsv($csvFile, array_values($row));
}
fclose($csvFile);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment