我的 HTML:
<select name="field" required="true">
<option value="">Choose ITEM</option>
<optgroup label="ITEMGROUP 1">
<option value="item1">item1</option>
<option value="item2">item2</option>
<option value="item3">item3</option>
<option value="item4">item4</option>
<option value="item5">item5</option>
<option value="item6">item6</option>
<option value="item7">item7</option>
</optgroup>
</select>
现在我想获取选定项目的值:
$item = $_POST['field'];
如果我想获取 optgroup 标签,我该怎么办?谢谢 !