News Feed
Sections

News Archive


Community Events






Don't see your event here?
Let us know!


Richard Heyes' Blog:
Reading a specific line in a file
1 comment :: posted Monday April 07, 2008 @ 12:56:08
voice your opinion now!

Richard Heyes has thrown together some code for a simple thing that he's seen developers request over and over again - moving to/reading from a specific line in a file.

After reading something on the php-general list I decided that a) I'm bored, and b) I'll write something which handles it. So here it is.

His code is simple - looping through the lines of the file until it locates your desired target (with some error checking along the way). Plus, if it's already fetched, it keeps it in a cached array for future retrieval.

tagged with: reading specific file line example code class




example database PHP5 releases code book zendframework PEAR release developer mysql framework zend package cakephp security job conference application ajax

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework