I have built an application which takes a csv file and processes it, saving all the interesting bits to my database.
The source of the csv file is an excel file which I have to download from a 3rd party website. In order to make it csv is simply save it as so in open office and bobs your uncle.
So when I do this from either my windows or linux machine, the files I create upload as expected no bother, however when my colleague does similar on his mac, then we have problems.
I know there are some differences between the the formats of the csv but surely once you've put the file through
$csvData = file_get_contents($file);
$lines = explode(PHP_EOL, $csvData);
$arrayOfLinesAndCols = array();
foreach ($lines as $line) {
$arrayOfLinesAndCols[] = str_getcsv($line);
}
then the output should be the same. The files we are both uploading 'look' the same when you open them.