I want read a line in file text. EX line 5. Any body can help me????
$fp=fopen("test.txt",r)or exit("khong tim thay file can mo");
while(!feof($fp)){
echo fgets($fp);
}
fclose($fp);
Thanks for read
I want read a line in file text. EX line 5. Any body can help me????
$fp=fopen("test.txt",r)or exit("khong tim thay file can mo");
while(!feof($fp)){
echo fgets($fp);
}
fclose($fp);
Thanks for read
Just put an incremental counter in your loop, only echo if that counter matches your requred line number, then you can simply break out of the loop