My goal is to get every line of text from text line number 10 to number 15.
text file :
my code :
$file = fopen('no_list.txt', 'r');
while ((feof ($file) === false) )
{
$i=1;
while ((feof ($file) === false) && $i<10 && $i<15 )
{
fgets($file);
$i++;
}
$splitdata = fgets($file);
echo $splitdata;
}
fclose($file);
The code only returns the data from line 15. Any suggestion what am I missing from my code? or any other solution to do it ?