如何为下面保存的选项数组设置 selected="selected"。谢谢 !
例如
<option value="Facebook">Facebook</option>
<option value="Twitter" selected="selected">Twitter</option>
<select name="'. $id .'['.$order.'][url]" id="'. $id .'['.$order.'][url]">
$socialicons = array ('facebook' => 'Facebook', 'twitter' => 'Twitter');
foreach ($socialicons as $socialicon) {
<option value="'.$socialicon.'" />'.$socialicon.'</option>
}
</select>