php 动态选中 select 标签代码
<select id="typeid" name="typeid" class="input w50"> <option value="">文章分类</option> <?php foreach ($typesRes as $t) {?> <option value="<?php echo $t['id']; ?>" <?php if(($t['id']==$currArticle['typeid'])){ ?> selected='selected' <?php }?>><?php echo $t['typename']; ?></option> <?php } ?> </select>