League\Csv Read Without Filtering Empty Rows/Lines

1.4k views Asked by At

I'm using League\Csv to reformat CSVs. I'm reading in a CSV, manipulating the data, then writing the result out to a new CSV.

Reading the docs it says when reading a CSV it will

Filter out the empty lines;

Is there any way to stop this from happening?

1

There are 1 answers

1
Sean Anderson On

Have you tried using a Statement object to process the Reader? It gives you more control over the selected rows. Perhaps the default statement would not include empty row filtering.

https://csv.thephpleague.com/9.0/reader/

See Records Selection, Advanced Usage.