Checking a list of vars for similar values?

This one’s a little hard to explain.
here goes…

I have a list of variables imported from a dbase/textfile. Looks something like this:

&title1=blablabtitle&content1=blabcontent&date1=august 2002&title2=balbalb&content2=balbalmorecontent&date2=march 2003&title3=…&content3=…&date3=august2002&itemcount=3

Its a list of, let’s say 50 items. These items provide content for dynamically generated movieclips on a timeline-like interface.

Some items share a same date (e.g. august 2002). when there’s two things in a same month, I need to generate two movieclips that pop out of my timeline…

I need something that tells me:
august 2002 --> 2 items
september 2002 --> 1 item
november 2002 -->3 items
december 2002 --> 1 item

how should I do this / what technique should I use ?

hope this makes a little sense…
thanks

Instead of
&title1=blablabtitle&content1=blabcontent&date1=august 2002
I’d use

&item1=titleHere|contentHere|dateHere
then use a count variable to track the number of items (variables) read in,
then loop through and use a “split(”|") on each,
gives you an array with
item1[0] = title, item1[1]=content and item1[2]=date;
now set up a var for each month (1 to 12 or better 0 to 11);
loop through items :
for (i=1; i<count (number of items, remember…); i++)
check if(item add i[2] (2’s the index for the date)== “january2002”)
then add 1 to the 1st var of the months,
else if(… == “february2002”)
increment 2nd month var (counter)
etc etc etc for all 12, so you’ll get a value for each…

Get the idea? Hope this pseudo-code is clear enuff, just thought that up quickly, might be a simpler way, I’m no guru :wink:

thanks man,
I see where you’re going with this.
I’ll try and put it in full code…
See if it works.

I’ll be back… 8]

stanley

okay…i checked this. First part works fine. I have a set of arrays now…
But the problem is I have 5 years on my timeline

so the starting situation (before the data kicks in): no items available on none of the months on the timeline

januari2003=0;
februari2003=0;
march2003 =0;


september2004=0;
oktober2004=0;
november2004=0;

etc … till december 2007=0;

that’s 60 vars…(thats an awful lot to type in…)
So if I have for ex. 4 date items

item1[2] (=januari2003)
item2[2] (=september2004)
item3[2] (=november2004)
item4[2] (=februari2005)

how do I check them against those 60 vars and how do I increase the value +1 of the var if I have a ‘matching couple’ ?