You could define an array of months, use [man]date/man to get the current month, and then loop backwards (going to the end of the array if you reach the beginning). Something like:
$months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
for($i = 0, $curr = date('m')-1, $year = date('Y'); $i < 3; $i++, $curr--) {
if($curr == 0) {
$year--;
$curr = 12;
}
echo $months[$curr] . " $year<br>\n";
}