PHP File read using while

File read using while

<?
$i=0;
$a = file("file.txt");
while(count($a) != $i) {
  echo htmlspecialchars($a[$i])."<BR>";
  $i++;
}
?>