I have a script that writes a .CSV ,pretty self explaining:
$handle = fopen($name);
foreach ($data as $tkey => $tval) {
fwrite($handle, $eol);
}
fclose($handle);
This works compleatly fine, everything is, as it should be.
BUT: At the end of the file, there is always a blank line that causes problems, when i want to process the .CSV with another programm. EX:
1 Date;Time
2 22.4;03:22;
3 23.4;09:22;
4 24.4;14:22;
5
When I reload the file and echo it to the browser, the line is not within the array, so it seems to be created, when the file is closed.
I have read aboud some sort of of PSR Coding guides, but thought these are more like ,yeah, guidelines. Is the blank line a fixed thing or is there a a workaround?