Reply to Re: reading the correct line sequence from a txt file

Your name:

Reply:


Posted by Rami Elomaa on 04/10/07 10:37

programming kirjoitti:
> Ok well your suggestion has sort of fixed the problem but know it is
> like reading
> every 3 of 4 lines, instead of 2 of 4 lines.
>
> <?php
> $listf = fopen ("./member.txt", "r");
> # read the file
> $line = fgets($listf, 1024);

The file is read here the first time, and the filepointer moves from row
1 to row 2. the data is however discared.

>
> while(($data = fgetcsv($listf,1024,"|"))!=FALSE)

Now it starts reading the file from the second line, and so on... That's
why the first line is not printed.

Just remove the extra fgets from the beginning.

--
Rami.Elomaa@gmail.com
"Olemme apinoiden planeetalla."

[Back to original 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

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