我想以<ul> <li>
格式显示我的数据库记录。我使用免费模板来设计我的前端。我正在读取这样的数据库数据
while ($row = mysql_fetch_assoc($result)) {
$categoryname = $row['category_name'];
}
在循环中我必须显示这样的记录
<li class="odd"><a href="services.html">Processors</a></li>
<li class="even"><a href="services.html">Motherboards</a></li>
<li class="odd"><a href="1_service.html">Processors</a></li>
<li class="even"><a href="2_services.html">Motherboards</a></li>
<li class="odd"><a href="3_services.html">Desktops</a></li>
<li class="even"><a href="4_services.html">Laptops & Notebooks</a></li>
<li class="odd"><a href="5_services.html">Processors</a></li>
<li class="even"><a href="6_services.html">Motherboards</a></li>
</ul>
怎么做这样的。请建议
如果我想像这样为每个喜欢提供单独的页面链接
<li class="odd"><a href="services.html">Processors</a></li>
<li class="even"><a href="services.html">Motherboards</a></li>
<li class="odd"><a href="services.html">Processors</a></li>
<li class="even"><a href="services.html">Motherboards</a></li>
<li class="odd"><a href="services.html">Desktops</a></li>
<li class="even"><a href="services.html">Laptops & Notebooks</a></li>
<li class="odd"><a href="services.html">Processors</a></li>
<li class="even"><a href="services.html">Motherboards</a></li>
</ul>
那怎么办呢?