22
02
2010
phphatesme.com, the largest and BEST PHP blog in Germany celebrates it's 500th birthday

And no, these are no 500 years, it's the 500th article! We wish Nils the absolutely best and are looking forward to the next 500 articles!
Nils, thank you very much for this great blog!
Written by Sebastian Bauer
Comments :
No comments »
Categories : PHP
Trackbacks :
No Trackbacks »
08
01
2010
Today I had a problem importing a CSV file in PHP. It seems that apache doesn't properly regognize the line endings from the csv file.
When CSV the file has been created on a Mac, you will get problems when using fgetcsv to parse CSV files under PHP: The line endings are incorrectly interpreted.
Try the following code:
'auto_detect_line_endings' enables PHP to interoperate with Macintosh systems and look after which line-ending conventions is used.
The common line endings are:
\n (UNIX/Linux)
\n\r (Windows)
\r (Mac)
Here is an wikipedia article about the historical reason behind different line ending at different platforms:
Newline History
Written by Martin Mohr
Comments :
3 Comments »
Categories : PHP
Trackbacks :
No Trackbacks »