Re: CSV file

From: Date: Wed, 24 Jun 2009 21:19:04 +0000
Subject: Re: CSV file
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-294543@lists.php.net to get a copy of this message
Hi, > To do the line count first, you have to read the whole file, how would > you do it? Something like this: $fp = fopen('/tmp/foo', 'r'); $count = 0; while (!feof($fp)) { fgets($fp); ++$count; } -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 20th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp

« previous php.general (#294543) next »