Posted by C. on 12/07/07 13:17
On 7 Dec, 13:05, Olaf Schinkel <tr...@schinkel.tv> wrote:
> mantrid schrieb:> I am using fopen() and fgetcsv() to open an excel file and extract data for
> > upload to mysql database. The doesnt seem to be a parameter in either of
> > these functions for ommitting the first row of the excel file. I am
> > currently using While ...... statement to read the rows and do things with
> > them. Can I ommit the first line without replacing my 'While....' loop with
> > a 'For......' loop?
>
> > Ian
>
> Remove the first line....
> $fh = fopen(...
>
> fgets($fh); <- only insert this line into your code
>
> while(...
>
> Olaf
I suspect if I suggested that validating the record with a regex
instead of using positional information might be more appropriate I'd
just confuse people. So I won't.
C.
Navigation:
[Reply to this message]
|