如果我的 php 值等于选项值,我想选择该选项值。我该怎么做?
假设我有这组选项值:
<select id="updateBirthmonth" class="birth-date">
<?php $selected-value = 'May'; ?>
<option>Month:</option>
<option>January</option>
<option>February</option>
<option>March</option>
<option>April</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>August</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select>