>I'm just curious if there's a function that allows you to see how many lines
>there are in a file.  I could just set up a while(!feof($fp)) { fgets($fp);
>count++; } obviously, but I'm curious if there's a function built in like
>"flines($fp)" that I haven't noticed at php.net?

If it's a relatively small file, it might be a little faster to do:

  $file = file("filename.txt" or die("Could not open file");
  echo count($file);

It will suck the whole file into an array of lines faster than you can do
fgets() in PHP.

Like Music?  http://l-i-e.com/artists.htm
Off-Topic:  What is the moral equivalent of 'cat' in Windows?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to