I'll try to explain a little clearer.
As I said, I have two variables representing a starting month and an ending month. This should encompass a time period for the observation of values, of which I'd like to sum.
Say a start month of 6 and an end month of 9.
I then want to go through the array generated from an sqldb and sum up the values for month 6, 7, 8, and 9 for EACH year.
Right now I have an element for each month with the related year and value. IE: [4.5] which is the year.month.value.
My first thought led me to think it'd be easier to first create an array for each year that held an array inside with a month => value relationship.
Ie 2006 2007
01 => 1's val 01 => 1's val
02 => 2's val 02 => 2's val
Then, I could go through each year and pick out the months I need and sum them up. From here I figure I can generate a final array that I can use to create a table and display a list of the highest values of the sum of the selected months.
My end goal is to have an array in this format:
For months (startmonth - endmonth):
2007 => Val
2006 => Val
2005 => Val
Which I can then compare against the forecasted value and generate a table of the current years value relative to historic years.
... (slightly higher neighbor values) ...
2008 Forecast Val
... (slightly lower neighbor values)...
I don't really need help with anything beyond the grouping of months per each year into a single array, rather than as 12 separate elements per month.