I have this HTML select options :
<select>
<option>Married</option>
<option>Single</option>
<option>In a relationship</option>
<option>Forever Alone</option>
</select>
and selected option is based on MySQL result, for example if $row['status'] = Married then <option selected>Married</option> and the other options doesn’t have ‘selected’ word on the option tag.
how to make this dynamic selected option?
An example: