<tr>
<td class="label">上级分类:</td>
<td>
<select name="parent_id">
<option value="0">顶级分类</option>
<?php foreach($cates as $cate): ?>
<option value="<?php echo $cate['cat_id']; ?>"
<?php echo $cate['cat_id']==$cates_data[0]['parent_id'] ?'selected' : ''; ?>
>
<?php echo str_repeat(' ',$cate['level']*2); ?>
<?php echo $cate['cat_name'];?>
</option>
<?php endforeach;?>
</select>
</td>
</tr>