I'm extremely new to php and I am trying to get how many lines there are in my file. I am currently using some code I found online.
$file = "filename";
$lines = count(file($file));
This returns 1
. and there are MANY more lines than that. Any insight? Does it have something to do with new line characters? I did a $fh = file($file); split('\n', $fh);
and the count of that is still 1....so I am not sure.