# Change "SELECTED" dynamically

**URL:** <https://forum.kirupa.com/t/change-selected-dynamically/236944>\
**Category:** Uncategorized\
**Created:** [August 25, 2007, 9:35am UTC](https://forum.kirupa.com/t/change-selected-dynamically/236944 "2007-08-25T09:35:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeltonnberg](https://avatars.discourse-cdn.com/v4/letter/j/a88e4f/32.png) [@joeltonnberg](https://forum.kirupa.com/u/joeltonnberg)\
**Post date:** [August 25, 2007, 9:35am UTC](https://forum.kirupa.com/t/change-selected-dynamically/236944/1 "2007-08-25T09:35:58Z")

</div>

Hi!

I want to set the initial value in a ordinary drop down menu dynamically, depending on the value from a recordset.

for example, if I have a menu as such:

```auto
<select>
  <option>option 1</option>
  <option>option 2</option>
  <option>option 3</option>
</select>

```

and want the selected option when page load to correspond with the following:

```auto
<?php echo $row_Recordset['option']; ?>

```

how would I go about to do that?
