You are here: Re: fopen() and fgetcsv() « PHP Programming Language « IT news, forums, messages
Re: fopen() and fgetcsv()

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация