i need this to read the last 5 lines of a txt file and include them into another page....it works fine if i use echo....
but the 5 txt file lines contain php code so need to use include()?
works when i include whole file....
help....
thx
$file = "./list.dat";
$f = file($file);
$end = count($f);
$a = $end - 5;
$b = $end - 4;
$c = $end - 3;
$d = $end - 2;
$e = $end - 1;
include($f[$e]);
include($f[$d]);
include($f[$c]);
include($f[$b]);
include($f[$a]);