How to read a text file line by line in PHP

1 Answer

0 votes
$fhandle = fopen("filename.txt", "r");
if ($fhandle)
{
    while (($text_line = fgets($fhandle)) !== false)
    {
        echo $text_line . "<br>";
    }
}
fclose($fhandle);


answered Jun 29, 2014 by avibootz

Related questions

...