lee101 said:I think that may work, it isn't checked at all though, so there may be errorsPHP:$file=file('testFile.php'); $lines=count($file); $i=$lines-5; while($i < $file){ echo $file[$i]; $i++; }
$file = file('file.txt');
foreach($file as $line){
echo $line;
}
Yes, but w1ww only wants the last 5 lines, that would display all of themahtum said:easier :p
$file = file('testFile.php');
for ($i = 5; $i >= 0; $i--) {
echo $file[count($file)-$i];
}

