如果我的服务器帐户中有一个包含以下代码的插件:
function script_options() {
$scripts = array(
'Forum' => array(
'403' => 'phpBB2',
'5' => 'phpBB3',
'417' => 'Simple Machines Forum',
),
'Blog' => array(
'410' => 'b2evolution',
'418' => 'Movable Type',
'409' => 'Textpattern',
'400' => 'WordPress',
),
'Wiki' => array(
'413' => 'DokuWiki',
),
);
$result = '<option value="">'.__rp('none','none').'</option>';
foreach ($scripts as $group => $list) {
$result .= "<optgroup label=\"$group\">";
foreach ($list as $script_key => $script_value) {
$result .= "<option value=\"$script_key\"".($script_key == isset($_GET['script'])?$_GET['script']:false ? ' selected="selected"':'').">$script_value</option>";
}
$result .= '</optgroup>';
}
return $result;
}
我怎样才能做出第一选择('400' 'Wordpress')
;如果用户没有选择它自己选择Wordpress
的任何东西。