I am using PHP to import a CSV file, which originates from an excel spreadsheet. Some of the fields contain line breaks in them, so when I reopen the csv in excel / open office
The accepted answer didn't solve the problem for me, but I eventually found this CSV parser library on google code that works well for multiline fields in CSV's.
parsecsv-for-php:
https://github.com/parsecsv/parsecsv-for-php
For historical purposes, the original project home was:
http://code.google.com/p/parsecsv-for-php/