hi there
assuming that you need last 4 month from the current month
(including the current month) below code may help you:
$date = getDate();
$month = $date["mon"];
$mname = array('1' => 'Jan',
'2' => 'Feb',
'3' => 'Mar',
'4' => 'Apr',
'5' => 'May',
'6' => 'Jun',
'7' => 'Jul',
'8' => 'Aug',
'9' => 'Sep',
'10' => 'Oct',
'11' => 'Nov',
'12' => 'Dec',
);
echo $mname[$month];
for($i=1; $i<=4; $i++ )
{
echo $mname[$month-$i] . "<br>";
}
you can edit as per your requirement
bye have a nice day
johnbest