Answers for "which of the following function is used to read a single line from the file in php?"

PHP
5

php read file line by line

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

    fclose($handle);
} else {
    // error opening the file.
}
Posted by: Guest on May-22-2020

Code answers related to "which of the following function is used to read a single line from the file in php?"

Browse Popular Code Answers by Language