Re: fgetcvs() 'bug', or am I stupid?
| From: | Rasmus Lerdorf | Date: | Fri, 08 Sep 2000 00:06:40 +0000 |
| Subject: | Re: fgetcvs() 'bug', or am I stupid? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2721@lists.php.net to get a copy of this message | ||
Hrm. Which version of PHP? Works fine for me in 4.0.2. I remember
fixing something like this a couple of months ago for PHP 3.0.10, so if
you are using something older than that, try upgrading.
-Rasmus
On Thu, 7 Sep 2000 joe@jWebMedia.com wrote:
> 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
>
>
>