Hi there,
I have been looking into the php fputcsv function, and have heard some comments that the files created using this method will not work on microsoft excel, is this correct?
Comment on php.net
since PHP is generally *nix-based, it makes sense that the line endings are always \n instead of \r\n. However, certain Microsoft programs (I'm looking at you, Access 97), will fail to recognize the CSV properly unless each line ends with \r\n. Secondly, if the first column heading / value of the CSV file begins with uppercase ID, certain Microsoft programs (ahem, Excel 2007) will interpret the file as being in the SYLK format rather than CSV, as described here: http://support.microsoft.com/kb/323626
So
If i am planning on outputting data in the format of
0, 0278221234, 60143512345, 5pt code, yes
1, 0278221234, 60143512345, 5pt code, yes
2, 0278221234, 60143512345, 5pt code, yes
3, 0278221234, 60143512345, 5pt code, yes
also,
what is the difference between writing a file using this function
and simply creating the line's as above and ending them with \r\n ?