Ingen?
Hej alla php proffs!
jag har en array hårdkodat som jag behöver bygga dynamiskt från en mysql tabel. Hur gör jag?
$lan = array(
'0' => array('value' => 'Blekinge', 'text' => 'Blekinge'),
'1' => array('value' => 'Dalarnas', 'text' => 'Dalarnas'),
'2' => array('value' => 'Gotlands', 'text' => 'Gotlands'),
'3' => array('value' => 'Gävleborgs', 'text' => 'Gävleborgs'),
'4' => array('value' => 'Hallands', 'text' => 'Hallands'),
'5' => array('value' => 'Jämtlands', 'text' => 'Jämtlands'),
'6' => array('value' => 'Jönköpings', 'text' => 'Jönköpings'),
'7' => array('value' => 'Kalmar', 'text' => 'Kalmar'),
'8' => array('value' => 'Kronobergs', 'text' => 'Kronobergs'),
'9' => array('value' => 'Gotlands', 'text' => 'Gotlands'),
'10' => array('value' => 'Norrbottens', 'text' => 'Norrbottens'),
'11' => array('value' => 'Skåne', 'text' => 'Skåne'),
'12' => array('value' => 'Stockholms', 'text' => 'Stockholms'),
'13' => array('value' => 'Södermanlands', 'text' => 'Södermanlands'),
'14' => array('value' => 'Uppsala', 'text' => 'Uppsala'),
'15' => array('value' => 'Värmlands', 'text' => 'Värmlands'),
'16' => array('value' => 'Västerbottens', 'text' => 'Västerbottens'),
'17' => array('value' => 'Västernorrlands', 'text' => 'Västernorrlands'),
'18' => array('value' => 'Västmanlands', 'text' => 'Västmanlands'),
'19' => array('value' => 'Västra Götalands', 'text' => 'Västra Götalands'),
'20' => array('value' => 'Örebro', 'text' => 'Örebro'),
'21' => array('value' => 'Ö;stergötlands', 'text' => 'Östergötlands')
);