手记

sql输出默认选择对应select值

<select name="" id="">
<option value="{$msg['n_type']}" <?php if($msg['n_type']=='0'){echo 'selected';} ?>>系统公告</option>
<option value="{$msg['n_type']}" <?php if($msg['n_type']=='1'){echo 'selected';} ?>>公司新闻</option>
<option value="{$msg['n_type']}" <?php if($msg['n_type']=='2'){echo 'selected';} ?>>公司视频</option>
<option value="{$msg['n_type']}" <?php if($msg['n_type']=='3'){echo 'selected';} ?>>案例视频</option>
<option value="{$msg['n_type']}" <?php if($msg['n_type']=='4'){echo 'selected';} ?>>教学视频</option>
</select>

0人推荐
随时随地看视频
慕课网APP