how do i manage my templates for this kinda of result i am using templates.inc
i tried but i could not make it i want out put like
catgory1
subcatagory11
subcatagory12
catagory2
subcatagory21
subcatagory22
subcatagory23
subcatagory24
the coding below is working while i don't use templates.inc please help me
$tpl=new Template(".");
$tpl->set_file(array("1"=>"1.tpl",
"2"=>"2.tpl",
"3"=>"3.tpl"
));
$catagory=mysql_query("Select from cat where uid='$uid'");
while($rowcat=mysql_fetch_row($catagory)){
print("<b>$rowcat[1]</b><br>"); // catagory here
$subcatagory=mysql_query("Select from subcat where cat_id='$rowcat[0]'");
while($rowsubcat=mysql_fetch_row($subcatagory)){
print("$rowsubcat[3]<br>"); //subcatagory here
}
}