[PHP] Reading lines from a CSV file

2002-03-10 Thread Don

Hi,

I have a comma delimited text file composed of many rows of text.  I've been looking 
at the PHP documentation for file system functions but cannot see a way to read a file 
row by row.  Each row may be different byte length.  How do I read only a row and have 
the file pointer at the start of the next row so I can read it, etc... until eof?

Thanks,
Don



Re: [PHP] Reading lines from a CSV file

2002-03-10 Thread Hank Marquardt

http://www.php.net/fgetcsv

The manual is your friend:)

If you like to do the work yourself, file() will suck the whole thing
into an array with the elements being the lines of the file.

On Sun, Mar 10, 2002 at 08:35:03PM -0500, Don wrote:
 Hi,
 
 I have a comma delimited text file composed of many rows of text.  I've been looking 
at the PHP documentation for file system functions but cannot see a way to read a 
file row by row.  Each row may be different byte length.  How do I read only a row 
and have the file pointer at the start of the next row so I can read it, etc... until 
eof?
 
 Thanks,
 Don

-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP  PHP II -- Starting March 25, 2002 
*** See http://www.hwg.org/services/classes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php