You are here: Re: deleting row in csv file « All PHP « IT news, forums, messages
Re: deleting row in csv file

Posted by Stefan Rybacki on 10/24/05 21:35

JDS wrote:
> On Mon, 24 Oct 2005 16:06:48 +0200, nescio wrote:
>
>
>>so my question is: how can i delete a row in a csv file?
>
>
> The question is, how are you reading, updating, and rewriting to the file?
>
> I recommend using file() to read the file into an array.
>
> Then update the value of the array
>
> Then write the value of the array back out to the file, overwriting the
> old file in the process. Use fopen() and fwrite().
>

Well this is what I would do in any other programming language (except java). But since
php has memory restrictions (mostly 8MB) I wouldn't recommend such a way, without knowing
the worst case (max size of the file). Just to mention. ;)

Regards
Stefan

 

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

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