phphatesme.com celebrates it's 500th!

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!

Bookmark phphatesme.com celebrates it's 500th!  at del.icio.us Digg phphatesme.com celebrates it's 500th! Mixx phphatesme.com celebrates it's 500th! Bloglines phphatesme.com celebrates it's 500th! Technorati phphatesme.com celebrates it's 500th! Bookmark phphatesme.com celebrates it's 500th!  at Furl.net Bookmark phphatesme.com celebrates it's 500th!  at blogmarks Bookmark phphatesme.com celebrates it's 500th!  at Ma.gnolia.com wong it! Stumble It!

fgetcsv in PHP fails with Mac-created files

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


Bookmark fgetcsv in PHP fails with Mac-created files  at del.icio.us Digg fgetcsv in PHP fails with Mac-created files Mixx fgetcsv in PHP fails with Mac-created files Bloglines fgetcsv in PHP fails with Mac-created files Technorati fgetcsv in PHP fails with Mac-created files Bookmark fgetcsv in PHP fails with Mac-created files  at Furl.net Bookmark fgetcsv in PHP fails with Mac-created files  at blogmarks Bookmark fgetcsv in PHP fails with Mac-created files  at Ma.gnolia.com wong it! Stumble It!