Hi, would appreciate some help re-coding the following so it will display the results not on one line (seperated by "|") but in a table of 3 columns.
It queries the DB for subcategories and if present list them seperated by "|"
$pol = mysql_query("select * from categories where parent = '$catid' order by name");
if (mysql_num_rows($pol) > 0) {
while ($scat = mysql_fetch_object($pol)) {
$subcatimg = rand(1,5);
$subcathtml .= "<img src=\"".$_SERVER["HOST_NAME"]."/images/cat-".$subcatimg.".gif\" border=\"0\" align=\"absmiddle\"><a href=\"".str_replace(" ", "_", $scat->name)."/".getindex($scat->name).".$pext\">".$scat->name."</a> | ";
}
$subcathtml = substr($subcathtml, 0, -2);
}
else $subcathtml = "Geen";
I've tried several web suggestions, including the one found on codewalkers, but cannot seem to assimilate it with the exsisting code above.
Thanks for any support!
Steve