Repeated column in PHP
<pre><code>$course = mysql_query('SELECT cc.name, c.fullname FROM mdl_course WHERE cc.id = c.id');

echo '&lt;table&gt;';
while($row = mysql_fetch_array($course))
{
     $categoryname = $row['name'];
     $coursename   = $row['fullname'];
     echo '&lt;tr&gt;&lt;td&gt;$categoryname&lt;/td&gt;
               &lt;td&gt;$coursename&lt;/td&gt;
           &lt;/tr&gt;
}
echo '&lt;/table&gt;';
</code></pre>

<p>I want the category name to display only once  i.e, it shouldn't repeat</p>
