日期:2014-05-16 浏览次数:20494 次
<select name="select_1">
<option value=""></option>
<option value="value_1">option_1</option>
<option value="value_2">option_2</option>
.....
<option value="value_n">option_n</option>
</select></td>
$value_select_1=1;
$select_arr=array('value_1','value_2','value_3','value_4');
foreach ($select_arr as $value){
if(intval(substr($value,-1,1))==$value_select_1)
echo $value.' selected';
}