fgetcvs() 'bug', or am I stupid?

From: Date: Thu, 07 Sep 2000 22:17:37 +0000
Subject: fgetcvs() 'bug', or am I stupid?
Groups: php.db 
Request: Send a blank email to php-db+get-2717@lists.php.net to get a copy of this message
I'm using fgetcvs() to parse a CVS file - my file is structed as such: "data","data2","data3" "data","data2","data3" etc... However, fgetcvs() will always skip the first field of data on a line, except for in the first line. I've found it's because there's no comma at the end of the lines, just a newline. if I go in and put in the comma, it works perfectly. However, I can't always do this - the file gets parsed when the 'user' uploads it. The only option I see right now is to go into the file on upload and use PHP to insert a comma at the end of every line (I'm assuming that's possible). Is there any other options? Is there something wrong with my data? Am I just stupid? Thanks, Joe

« previous php.db (#2717) next »