Forum Moderators: coopster

Message Too Old, No Replies

Parse data from text tile and analyze results

         

babloo

10:30 am on Oct 8, 2004 (gmt 0)

10+ Year Member



Hello,

I have a text file with pipe delimiter and I would like to know how to get the following stats.

Sample of text file.
ID¦Date
1¦10/07/2004
2¦09/07/2004
1¦10/07/2004
3¦09/07/2004
2¦10/07/2004

How I can generate the following.

1. how to get the count of IDS.
2. how to get the count of unique IDS.
3. how to get the count of unique IDS for today's date

Please help me if anybody has the code.

Thankyou
Babloo

mincklerstraat

2:21 pm on Oct 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you'll probably want to use file() and explode(), array_unique() might come in handy. Check the array functions and the string functions, that'll help you out once you have read the file with file().