I was wondering how to read a file on the same server and get the input from each line.
I know this much
$fp = fopen("file", "r")
But I don't know how to get each line seperately. I need this to read from a .txt (plain Text File). Any help would be greatly appreciated. Thanks!!
-Ryan
hello ryan.. you can pull each line of a text file into an array. it's very simple.
$array = file("file.txt"); $count=count($array);
$i=0; while($i < $count) {
echo "$array[$i]<br>";
++$i;
Thanks Mike 🙂