dki: Dropdown : Suche funktioniert nicht

Beitrag lesen

Probiere mal das:

$arr = Array('New', '1 Month', '2-6 Months', '6-12 Months', '1 Year');
// ergaenzungen moeglich
// ein assoziativer array waere auch gut denkbar...

echo '<form method="post" action="search.php">'
  .'<select size="1" name="costum_field">';

for ($i = 0; $i < count($arr); $i++)
 echo '<option value="'.$i.'"'.($costum_field != $i ? '' : ' SELECTED').'>'.$arr[$i].'</option>';

echo '<select><input type="submit"></form>';