<?
$txt = fopen("dosya.txt","r"); 
while(!feof($txt)) {
   $x++;
   $satir = fgets($txt);
   if ($x>0 and $x<11) {
      echo("<font color=#black>$satir</font><br>\n");
   }
   if ($x>10 and $x<21) {
      echo("<font color=#red>$satir</font><br>\n");
   }
   if ($x>20 and $x<31) {
      echo("<font color=#blue>$satir</font><br>\n");
   }
}
fclose($txt); 
?>
gelişi güzel yazdım ama inş çalışır