View Single Post

  #3 (permalink)  
Old 12-07-2007
Olaf Schinkel
 
Posts: n/a
Default Re: fopen() and fgetcsv()

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
Reply With Quote