Hi everyone,
I've got a problem here If you can help me please.
In mycat01.php I have this link:
Automobiles
"address of this link is: mycat02.php?step=step01&catid=1&catname=Automobiles"
when you click on that you get a very messy output like this :
Automobiles : Cars : Alfa Romeo
Automobiles : Classic Cars : American
Automobiles : Cars : Audi Automobiles : Audio Items
Automobiles : Classic Cars : Austin Automobiles
Automobiles : Cars : BMW Automobiles : Classic Cars : BMW
Automobiles : Motorbikes : BMW
Automobiles : Other Vehicles : Campers & Caravans
Automobiles : Audio Items : Amplifiers
Automobiles : Other Vehicles : Boats & Watercraft
Automobiles : Classic Cars : Alfa Romeo
now lets have at php code where we get above result.
<?
$query1=mysql_query("SELECT * FROM categories WHERE name LIKE '$catname%'");
$nrw=mysql_num_rows($query1);
$cnt=0;
while ($row=mysql_fetch_array($query1)) {
$todsp=substr($row['name'],$sbs);
$subcat[$cnt]=$todsp;
$subcatid[$cnt]=$row['catid'];
$sbid[$cnt]=$row['id'];
$cnt++;
}
for ($i=0;$i<$cnt;$i+=2) {
$j=$i+1;
?>
<td width="50%" class="c2"><a href="viewcat.php?step=step1&catid=<?=$catid;?>&thesbid=<?=$sbid[$i];?>&subcatid=<?=$subcatid[$i];?>"><?=$subcat[$i];?></a></td>
<td width="50%" class="c2"><a href="viewcat.php?step=step1&catid=<?=$catid;?>&thesbid=<?=$sbid[$j];?>&subcatid=<?=$subcatid[$j];?>"><?=$subcat[$j];?></a></td>
in my database I have
Tabel "categories "
id: 274921
catid: 998
name: Automobiles : Cars : Alfa Romeo
[COLOR=red]id: [/COLOR] 274922
[COLOR=red]catid: [/COLOR] 999
[COLOR=red]name: [/COLOR] [COLOR=blue]Automobiles : Classic Cars : American [/COLOR]
etc.....
ok now my question is ,
is there any way i may conrol the output?
I dont want to get something like this
Automobiles : Cars : Alfa Romeo
because it is very hard to read specially when you are dealing with too many result.
so instead of getting this: Automobiles : Cars : Alfa Romeo
I want to get something like this Cars : Alfa Romeo
(we delete Automobiles (first parent) and change "Cars" to bold or color)
By the way , I can not touch the database.🙁
Thank you.