<?php //list列1 function index_list1($pid,$num){//外部调用 $db = MySql::getInstance();//链接数据库 $sql = "SELECT sortname,pid FROM ".DB_PREFIX."sort WHERE pid= ".$pid." LIMIT 0,$num";//SQL语句 $list = $db->query($sql);//转换 $jici = 0;//自定义变量 ?> <?php while($row = $db->fetch_array($list)){//转换 $jici++;//自定义变量+1 ?> <li id="i_h_t<?php echo $jici; ?>" onmouseover="slide('i_h_t','i_h_c',<?php echo $jici; ?>,5,'i_h_stay');" class=""><?php echo $row['sortname']; ?></li> <?php }?> <?php }?>