The only thing that I would change is that $ii variable since it doesn't make sense
PHP Code:
$i = 1;
while ($i <= 31)
{
$date_menu .= "<option value=\"$i\">$i</option>\n";
$i++;
}
echo '<select name="date_part">'."\n";
echo $date_menu;
echo '</select>';
The same output can also be obtained using sightly different code so I think is more a matter of taste =)