我的数据库中有 20 行,我在主页 index.php 中有一个标题,其中我有两个类,我想在一个类中显示 10 条记录,在另一个类中显示 10 条记录。所以请帮助我提前谢谢
<li>
<a href="index.php" class="parent"><span>Home</span></a>
<div class="columns two">
<?php
$qry = "SELECT `SectionId`, `Title` FROM `section`";
$records = mysql_query($qry);
$num_of_rows = mysql_num_rows($records) / 2;
while($record= mysql_fetch_array($records))
{
?>
<ul class="one">
<li>
<a href="department.php?sId=<?php echo $record['SectionId'];?>">
<span><?php echo $record['Title']; ?> </span>
</a>
</li>
</ul>
<ul class="two">
<li>
<a href="department.php?sId=<?php echo $record['SectionId'];?>">
<span><?php echo $record['Title']; ?></span>
</a>
</li>
</ul>
<?php
}
?>
</div>
</li>