Tag Archives: fgetcsv()

PHP: fgetcsv(), fgets() and file() line ending detection issues

Having problems with fgetcsv(), fgets() or file() incorrectly detecting line endings? Not a problem! Depending on the operating system in which the file was created the line endings tend to be different: Linux: \n OS X: \n Windows: \r\n

Posted in PHP