displaying database records in unordered list format
<p>I want to display my database records in <code>&lt;ul&gt; &lt;li&gt;</code> format. I have using a free template to design my front end. I am reading database data like this</p>

<pre><code>while ($row = mysql_fetch_assoc($result)) {
    $categoryname = $row['category_name'];
}
</code></pre>

<p>and within the loop i have to display records like this</p>

<pre><code>&lt;li class="odd"&gt;&lt;a href="services.html"&gt;Processors&lt;/a&gt;&lt;/li&gt;
         &lt;li class="even"&gt;&lt;a href="services.html"&gt;Motherboards&lt;/a&gt;&lt;/li&gt;
        &lt;li class="odd"&gt;&lt;a href="1_service.html"&gt;Processors&lt;/a&gt;&lt;/li&gt;
        &lt;li class="even"&gt;&lt;a href="2_services.html"&gt;Motherboards&lt;/a&gt;&lt;/li&gt;
         &lt;li class="odd"&gt;&lt;a href="3_services.html"&gt;Desktops&lt;/a&gt;&lt;/li&gt;
        &lt;li class="even"&gt;&lt;a href="4_services.html"&gt;Laptops &amp; Notebooks&lt;/a&gt;&lt;/li&gt;
         &lt;li class="odd"&gt;&lt;a href="5_services.html"&gt;Processors&lt;/a&gt;&lt;/li&gt;
         &lt;li class="even"&gt;&lt;a href="6_services.html"&gt;Motherboards&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
</code></pre>

<p>How to do like this. Please suggest</p>

<p>if i want to give seperate page link to each lik like this</p>

<pre><code>&lt;li class="odd"&gt;&lt;a href="services.html"&gt;Processors&lt;/a&gt;&lt;/li&gt;
         &lt;li class="even"&gt;&lt;a href="services.html"&gt;Motherboards&lt;/a&gt;&lt;/li&gt;
        &lt;li class="odd"&gt;&lt;a href="services.html"&gt;Processors&lt;/a&gt;&lt;/li&gt;
        &lt;li class="even"&gt;&lt;a href="services.html"&gt;Motherboards&lt;/a&gt;&lt;/li&gt;
         &lt;li class="odd"&gt;&lt;a href="services.html"&gt;Desktops&lt;/a&gt;&lt;/li&gt;
        &lt;li class="even"&gt;&lt;a href="services.html"&gt;Laptops &amp; Notebooks&lt;/a&gt;&lt;/li&gt;
         &lt;li class="odd"&gt;&lt;a href="services.html"&gt;Processors&lt;/a&gt;&lt;/li&gt;
         &lt;li class="even"&gt;&lt;a href="services.html"&gt;Motherboards&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
</code></pre>

<p>then how to do it?</p>
