note 24148 deleted from function.fgetcsv by danbrown

From: Date: Sun, 17 May 2009 18:23:21 +0000
Subject: note 24148 deleted from function.fgetcsv by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155109@lists.php.net to get a copy of this message
Note Submitter: justin at indent dot com dot au ---- If you're working in Excel on a Mac and are exporting a spreadsheet as a CSV, PHP won't recognise the line breaks, and interprets the file as one really long line. It borders on a bug really. For me, I just open the file in BBEdit or BBEdit Lite, convert the file from Mac to Unix, and all is well. But if you're dealing with user-contributed files, you'll need to convert the line-endings first... replacing all \r's with \n's should do it.

« previous php.notes (#155109) next »