Posted by Rik Wasmus on 12/06/07 23:41
On Thu, 06 Dec 2007 21:29:44 +0100, mantrid <ian.dandav@virgin.net> wrot=
e:
> I am using fopen() and fgetcsv() to open an excel file and extract dat=
a =
> 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....' loo=
p =
> with
> a 'For......' loop?
By discarding the first row before the while loop?
$fh =3D fopen(...);
fgetcsv($fh);
while($row =3D fgetcsv($fh)){
//stuff...
}
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|