<select name="station"> <option value="">카테고리 선택</option> <?php $sql = "select num, name from 테이블명 order by num"; $result = sql_query($sql); while ($row2 = sql_fetch_array($result)){ print "<option value='".$row2['name']."' "; if(($row['name']) == $row2['name']){ print " selected='selected'"; } print ">".$row2['name']."</option>\n"; } ?> </select>