- mktime: documentation ( source)
- date: documentation ( source)
<?php
$m= date("m");
$de= date("d");
$y= date("Y");
$svnumber=array();
for($i=0; $i<=6; $i++){
$date=date('Y-m',mktime(0,0,0,($m-$i),$y));
echo $date;
}