I AM LISTENING TO
|

WHAT I LIKE

New Release of the FLV Player Offline Gmail
Alex    

fgetcsv mac line endings



29. January 2009

When using fgetcsv to parse CSV files under PHP, you will run into problems when CSV files have been created on a Mac, as line endings are incorrectly interpreted.

Use this before opening the file.

ini_set(‘auto_detect_line_endings’,TRUE);
$handle = fopen(‘file’,’r’);




Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz