function cate_name(&$class_rows, $classid) { $name = $class_rows[$classid]['classname']; if ($class_rows[$classid]['topclass']) { $name = cate_name($class_rows, $class_rows[$classid]['topclass']) . '>' . $name; } return $name; }
<td><strong><a href="?act=edit&uid=<?php echo $val['uid']; ?> "><?php echo $val['title']; ?> </a></strong></td> <td><font color="<?php echo $val['color']; ?> "><?php echo $val['url']; ?> </font></td> <td><?php echo cate_name($class_rows, $val['classid']); ?> </td> <td align="center"><a href="<?php echo $val['url']; ?> " target="_blank">浏览</a> | <a href="?act=edit&uid=<?php echo $val['uid']; ?> ">编辑</a> | <a href="?act=del&uid=<?php echo $val['uid']; ?> ">删除</a></td> </tr> <?php }