Page 1 of 1

Stats question: Find stats from a given year to this year

Posted: Fri Mar 26, 2010 9:58 pm
by JKM
Hi there!

I was just wondering about how I could solve this 'issue'. I want to set a $startYear (to for example 2000) and do something like this:

Code: Select all

foreach(year) {
    $result .= 'blabla,';
}
echo $result;

Re: Stats question: Find stats from a given year to this year

Posted: Sat Mar 27, 2010 2:38 am
by DaiLaughing
Today's the day for me not understanding questions!

What sort of data is it, where is it coming from?

If you know what years exist then you could just use a FOR loop to cycle through them:

Code: Select all

for (year=1995;year<=2010;year++)