jcadima
1/1/2018 - 4:55 PM

PHP Read file line by line


https://stackoverflow.com/questions/13246597/how-to-read-a-file-line-by-line-in-php

<?php
$handle = fopen("inputfile.txt", "r");
if ($handle) {
    while (($line = fgets($handle)) !== false) {
        // process the line read.
    }

    fclose($handle);
} else {
    // error opening the file.
}