function months(){
for($i=1;$i<=12;$i++)
if($i<10) {
echo '<option value="'."0".$i.'">'."0".$i.'</option>';
}
else{
echo '<option value="'.$i.'">'.$i.'</option>';
}
}
This populates a dropdown with 01, 02, 03... instead of 1, 2, 3...
So, I concatenated 0 and $i if $i<10 and it works, but maybe it is possible by formatting $i as two digits, or some similar, shorter method ?