New Line
To create a second row in a spreadsheet a new line is required. The only way I can get a new line is by echo PHP_EOL. The script shown below creates two lines when viewed in a text editor and two rows when viewed in a spreadsheet programme.
<?php
header('content-type: text/csv');
header('content-disposition: attachment;filename=ticket-sales.csv');
echo "a, b, c, d, e";
echo PHP_EOL;
echo "f, g, h, i, j";