count array? (newbie)
From: knoak (knoakske_at_hotmail.com)
Date: 05/31/04
- Next message: Frostillicus: "array_multisort on $GLOBALS array"
- Previous message: Pedro Graca: "Re: how to pass php sertch results to c++ program?"
- Next in thread: Christian Fersch: "Re: count array? (newbie)"
- Reply: Christian Fersch: "Re: count array? (newbie)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 May 2004 06:45:04 -0700
Hi there,
I wrote a counter script which counts each unique visitor,
and counts how often a visitor has visited. The data
is stored in a "counter.txt" file divided by "||".
The lines in the file are constructed as follows:
linenumber||ip-address||times-visited||
e.g.
...
43||34.913.657.901||53||
44||436.422.67.78||5||
45||346.465.3.436||27||
...
I count unique visitors by counting the number of lines,
but how can i count the total of hits?
So that means adding up the 3rd part of each line...
(I've searched php.net, and tried some of the array functions
but i can't figure it out.)
Thanks in advance.
Greetings Knoakske
- Next message: Frostillicus: "array_multisort on $GLOBALS array"
- Previous message: Pedro Graca: "Re: how to pass php sertch results to c++ program?"
- Next in thread: Christian Fersch: "Re: count array? (newbie)"
- Reply: Christian Fersch: "Re: count array? (newbie)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]