// taken from: http://stackoverflow.com/questions/1062716/php-returning-the-last-line-in-a-file $file = "/path/to/file"; $data = file($file); // this will return an array of the data $line = $data[count($data)-1]; // this will return the last child in the array
__________________
My Blog/Site: Please login or register to view this content. Registration is FREE
« Reply to How do I retrieve the last line of a file?