Hi All,
 
I'm trying to get some code to display like:
 
 
Manufacturer 1
     Type 1
     Type 2
     Type 3
 
Manufacturer 2
     Type 1
     Type 2
     Type 3
 
Manufacter 3
     Type 1
     Type 2
     Type 3
 
 
My code is:
 
 
<?php
 
$manufQuery = db_query("SELECT manufacturer,type FROM kcs_threads ORDER
BY manufacturer,type");
 
$thread_manufacturer = '';
$thread_type = '';
 
while ($manufResult = db_fetch($manufQuery)) {
 
                if ($thread_manufacturer !=
$manufResult['manufacturer'])
                {
 
                                echo "<img
src=\"/{$baseURL}/Graphics/spacer.gif\" width=\"14\" height=\"1\"><a
href=\"{$baseURL}/threads/{$manufResult['manufacturer']}\">{$manufResult
['manufacturer']}</a><br />";
                                $thread_manufacturer =
$manufResult['manufacturer'];
 
                }
 
                if ($thread_type != $manufResult['type'])
                {
 
                                echo "<img
src=\"{$baseURL}/Graphics/spacer.gif\" width=\"20\" height=\"1\"><a
href=\"{$baseURL}/designers/".$sort."/".$manufResult['type']."\"><font
class=\"catalogueSubCatLink\">{$manufResult['type']}</font></a><br>\n";
                                $thread_type = $manufResult['type'];
                                                                
                }
                                
}
 
?>
 
Right now it is displaying like:
 
Manufacturer 1
     Type 1
     Type 2
     Type 3
Manufacturer 2
     Type 1
     Type 2
     Type 3
Manufacter 3
     Type 1
     Type 2
     Type 3
 
Any idea's on where to throw a echo "<br>"; ????
 
I've tried within the while loop, after it, within the if() statements
and outside them. Nothing seems to work.
 
Any idea's?
 
Thanks much.
 
Aaron

Reply via email to