Hey me again,
I am trying to find out how to count the amount of lines in a text file. Something like mIRC does, for example.
$lines(filename.txt) would output something like "13" if there was 13 lines of text. I am trying to find out how to do that using php. Stupid but i looked up lines() but it didn't work lol.
Thanks,
b0r3d
use the file() function to put it into an array, and count it.
example:
$arr=file("test.txt"); $lines=count($arr);
echo "Theres $lines lines in test.txt";