I'm writing a script to upload a csv file (with a little help from jpadie !!). However, when I use fgetcsv it always seems to read a blank line at the end of the file and I can't for the life of me figure out why. I've checked the file and there's no extra line feed at the end. Does anybody know why this is happening?