<?php
$months = array();
for($i = 0; $i < 12; $i++){
$timestamp = strtotime("-$i month");
$value = date('n,Y', strtotime("-$i month"));
$text = date('F Y', strtotime("-$i month"));
$months[$value] = $text;
}
print '<select>';
foreach($months as $value => $text){
print '<option value="'.$value.'">'.$text.'</option>';
}
print '</select>';
?>
$months = array();
for($i = 0; $i < 12; $i++){
$timestamp = strtotime("-$i month");
$value = date('n,Y', strtotime("-$i month"));
$text = date('F Y', strtotime("-$i month"));
$months[$value] = $text;
}
print '<select>';
foreach($months as $value => $text){
print '<option value="'.$value.'">'.$text.'</option>';
}
print '</select>';
?>