日期:2014-05-17 浏览次数:20609 次
$query2=mssql_query("select * from tb_xmpc where xm_pcid='$xmpc_id'");
$temp=array();
while($myrow2=mssql_fetch_array($query2)){
array_push($temp,$myrow2['xmpc_ecpr']);
}
<option selected="selected"><?php foreach($temp as $val){echo $val;}?></option>
<select name="rexm_pcid" id="rexm_pcid">
<?php
$query2=mssql_query("select * from tb_xmpc");
while($myrow2=mssql_fetch_array($query2)){
$selected= $myrow2[xmpc_id]==$xmpc_id ? 'selected="selected"' : '';
?>
<option value="<?php echo $myrow2[xmpc_id];?>" <?php echo $selected;?>><?php echo $myrow2[xmpc_expr];?></option>
<?php