Hello,
I'm using the basic code to read database from a flat file. Here it is:
$fp = fopen('latestinfo.txt','r');
while (!feof($fp))
{
$line = fgets($fp, 1024);
list($type, $name, $size, $date, $folder) = split('\|',$line);
echo '<tr>';
echo '<td>'.$type.'</td>';
echo '<td>'.$name.'</td>';
echo '<td>'.$size.'</td>';
echo '<td>'.$date.'</td>';
echo '</tr>';
$fp++;
}
fclose($fp);
I'd like to limit the number of lines it will read. Like, it will display first 15 lines from the text file. Can you plz tell me how I can do this?
Thanks