You should put double quotes around your html tag attributes (which I think is what caused your problem). Try this:
echo '<select name="fddag"><option value="0">Dag</option>';
for ($dag_tag = 1; $dag_tag <= 31; $dag_tag++) {
echo '<option value="' . $dag_tag . '"';
if ($fddag == $dag_tag) {
echo ' selected';
}
echo '>' . $dag_tag . '</option>';
}
echo '</select>';
$mnd_arr = array(1 => 'Januar', 'Februar', 'Mars',
'April', 'Mai', 'Juni', 'Juli',
'August', 'September', 'Oktober',
'November', 'Desember');
echo ' <select name="fdmnd"><option value="0">Måned</option>';
foreach ($mnd_arr as $key => $mnd_tag) {
echo '<option value="' . $key . '"';
if ($fdmnd == $key) {
echo " selected";
}
echo '>' . $mnd_tag . '</option>';
}
echo '</select>';