|
-
Oct 4th, 2005, 02:53 PM
#1
Thread Starter
Frenzied Member
number of entries in file
at the moment my file is just a text file on the web, so i just view it like
www.my-site.com/scores.txt
which gives me all the scores, eg..
mark=5644
john=4544 etc..
but is there a way i can make something to show me the total number of entries in the text file?
-
Oct 4th, 2005, 03:57 PM
#2
Lively Member
Re: number of entries in file
Is your file always in that format, as in each entry is on a new line? If so, you could use explode() with the newline character as the delimiter, and then use count() to get the number of entries.
Good luck
-
Oct 5th, 2005, 07:26 AM
#3
Thread Starter
Frenzied Member
Re: number of entries in file
thanks but at the top of this file, is it possible to have smething like:
Total number of entries in this text file: x
-
Oct 5th, 2005, 09:37 AM
#4
Re: number of entries in file
Yes. Just use a vairable in the PHP script which creates it to count the number of lines.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|