echo the before year and month using a function in php?
<p>i am a newbie of php, supposed my blog created on 2011 year  1 month.and the article stored time as this <code>1305357473</code>. now i want to use a function, which can output the before year and moth as this.</p>

<pre><code>2011 year  1 month
2011 year  2 month
2011 year  3 month
2011 year  4 month
2011 year  5 month
......
</code></pre>

<p>i want to make the function can output the current and the past year and month.
this is my function and output the result. but i don't know how to finish.</p>

<pre><code>function outYearMonth($year,$month){
    $year=date(Y);
    $past_month=strtotime(date(1)) ; 
    $month=strtotime(date(m)); 

    $jg_month=round($month - $past_month);

    $month=array();
    for($i==0;$i&lt;=$jg_month;$i++){
        $month[]= date(1)+1;
    }
}
</code></pre>
