<?php
$degerler = file('haberler.txt');
$toplamsatir = count($degerler);
if($toplamsatir > 10) {
$basla = $toplamsatir-10; $bitir = $basla+10;
}else { $basla = 0; $bitir =$toplamsatir;  }
for($i=$basla; $i <= $bitir; $i++) {
$tampon .= "$degerler[$i]\n";
}
echo $tampon;
?>