Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- number of rows
- Piotr Wolski
July 15, 2004, 9:49 pm
rate this thread
Re: number of rows
Do you want the number of lines in a file? If so open the file, loop through
the lines keeping a counter, and then close it.
Or having recently read a similar thread on a Perl newsgroup, it might be
worth considering using the 'wc' command, if you're on Unix. I don't tend to
like spawning external programs within a script, but it's hard to argue with
the benchmarks for larger files.
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
- » Storing form field names in an array and writing values to a text file
- — Next thread in » PHP Scripting Forum