面对根据jquery在多个类别上集成的问题

时间:2013-07-20 01:08:56

标签: php jquery loops jquery-ui-accordion

我在以下PHP循环中使用手风琴jquery,但它无法正常工作。当我打开任何类别窗口时,它会自动关闭其他窗口。我需要在我从后端创建的每个类别上应用accordion jquery。我将非常感谢你的帮助。

$cates=mysql_query('select * from categories');
   while($gets=mysql_fetch_array($cates))
   {
   $title=$gets['title'];
   $id=$gets['id'];
   echo'<li ><a class="account nav-user" href="categories.php?cid='.$id.'" style="text-decoration:none;color:orange;">'.$title.'</a> //Categories list
<ul>      
<ul>';

    $ads=mysql_query('select * from items where cid="'.$id.'" order by id desc limit 5');
    while($items=mysql_fetch_array($ads)){
    $item=$items['product_name'];
    $adid=$items['id'];

               echo '<li><a style="text-decoration:none;color:grey;" href="addetail.php?id='.$adid.'">'.$item.'</a></li>'; //Product list

}             
    echo '</ul>';
          echo '</li> </ul>';
    }

0 个答案:

没有答案