Forum Moderators: coopster
$fstring = fread($fd, filesize('/path/to/file/filename.txt')); $line = explode ("\n", $fstring);
$linecount = 1; while (list($key, $val) = each($line)) { if ($linecount == '10') { //Do something here } }
Description string fread ( resource handle, int length )
My usage was similar to this line $fd = fopen ('/path/to/file/filename.txt', "r+");
Also incomplete... I am not incrementing the counter in my example.