Question: how to display selected value in dropdownlist in php?
Answer: How to Display Selected Value From Dropdown List. For Example if I have a dropdown list of years like: <? php $years = array(); for ($i = 1900; $i < 2026; $i++) { $years[] = $i; } echo "<select name='Year'>"; foreach($years as $option){ echo "<option value='{$option}'>{$option}</option>"; } echo "</select>"; ?>