Greetings all once again! I am having a few problems with a few lines of code. Let me try to explain what I am getting at. I am creating a nav side bar that looks in a products table, grabs the uniqe categories of product, (hence the link, so that they can browse by category so to speak), and the number in the " ( ) " is the number of recods in that specific category.The end result of the code should look like this:
Link 1 (60)
Link 2 (55)
But, this is what I am getting:
Link 1
(60)
Link 2
(55)
Here is the snippet of the html and the php.....
<div class="relatedLinks">
<h3>Product Categories</h3>
<?php do {
echo "<a href=\"products1.php?category=".$row_getUniCat['category']."\">".$row_getUniCat['category']."</a>";
mysql_select_db($database_mysqlconnect, $mysqlconnect);
$query_getnum = "SELECT count(*) FROM products where category = '".$row_getUniCat['category']."'";
$getnum = mysql_query($query_getnum, $mysqlconnect) or die(mysql_error());
$row_getnum = mysql_fetch_assoc($getnum);
$totalRows_getnum = mysql_num_rows($getnum);
echo "(<font style=\"color:blue;font-size:11px;font-weight:bold;\">".$row_getnum['count(*)']."</font>)";
} while ($row_getUniCat = mysql_fetch_assoc($getUniCat)); ?>
</div>
I cannot see why it is adding a line break or what is causing the record count to go to the next line.It is not a browser prob, I have looked at in IE, and Mozilla.
Also, sorry for the line breaks in the code, it is the browser doing it not me.
Thanks in advance for your help,
Todd😃