Today I was facing an issue that PHP CSV Iteration unable to figure out the end of line.
While it happens that whatever CSV come to use our code to simplify thier work does not have all the same as they looks same.
The CSV with I was playing was Exactly similar to out system requires as by looking on them.
But Wait there was a difference that it was saved with different formatted with the CSV extension but the character encoding was quite different for this code was unable to get the EOL [End of line].
After some research I was able to figure out the solution as :
ini_set("auto_detect_line_endings", true);Go and grab more about this at Read More Here, But there are few points that are bad about it that you have to make a compromises with memory with making on this on your script or server.
So finally I was able to detect the EOL after making it on the Script and everything worked fine after that. :)