I have a basic PHP script that creates a csv file from an array. Here is an example of the code:
$array = [ [1,2,3], [4,5,6] ]; $handle = fopen(\'te
I found this solution on another question: https://stackoverflow.com/a/8354413/1564018
$stat = fstat($handle); ftruncate($handle, $stat['size']-1);
I added these two lines after fputcsv() and they removed the last new line character, removing the blank line at the end of the file.