Hi, 021 wrote: > <?php > $lines = file('sometext.txt'); > for ($i = 0, $j = count($lines); $i <=1; $i++) { > print $lines[$j - $i]; > } > ?> For a start, try this instead: $lines = file('sometext.ext'); $last = end($lines); Secondly, do you have an example of the real log file? Cheers, David Grant -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php