How to read in a file, a line at a time?
Thanks :-)
n00b
file() reads the entire file into an array
There are also a lot of other functions that could read a file in different ways ... but you have to red the manual for that 🙁
The following script will print out the file text.txt one line at a time.
$file_name = "c:/test.txt"; $file_array = file($file_name);
foreach ($file_array as $line) { echo $line; }