<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
$data = [
'1,2,3',
'4,5,6',
'7,8,9'
];
header('Content-Type: text/csv');
header('Content-disposition: attachment;filename=data.csv');
foreach ($data as $row) {
echo $row, PHP_EOL;
}
?>
header('Content-Type: text/csv');
header('Content-disposition: attachment;filename=data.csv');
array(14) { [0]=> string(49) "299249 wffwtwerwer MIT-1.3.2/14-29" [1]=> string(49) "299257 werewrewrwe.net MIT-1.3.2/14-44" [2]=> string(48) "299311 rewrwerwerx.net MIT-1.2.2/8-46" [3]=> string(52) "900301834 werwerwerw.net MIT-1.3.3/20-13" [4]=> string(0) "" }