DevShed: Handling File Data with PHP (Reading & Seeking)
DevShed has posted the fifth part of their "handling files in PHP" tutorial series today (excerpted from the book "Beginning PHP and PostgreSQL 8: From Novice to Professional") with a focus on read from multiple places in a file to get to different data.
In this fifth part of an eight-part series on working with file and operating systems with PHP, you'll learn how to read data from a file and move the file pointer.
Example code is included showing how to use the file, file_get_contents, fgetc, fgetcsv, readfile and fscanf (among several others). Also included is code showing how to use the fseek method to move around in a file.