View Single Post
Old 03-29-2006, 01:19 PM   #8 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
doesn't your code enter a blank line on the first iteration of your do/while loop? i'd suggest this format:
PHP Code:
<table id="tbl" border="0" cellpadding="0" cellspacing="0">    
<tr>
  <td><p><b>Category</b></p></td>
  <td colspan="2"><p><b>Description</b></p></td>
</tr>

<?
while ($row_rsCategories mysql_fetch_assoc($rsCategories)) {

  
$color = ($color == $color1) ? $color2 $color1;

    echo 
"<tr style=\"background-color:$color\">\n
  <td width=\"100\"><p>" 
$row_rsCategories['category_name'] . " (" .$categories[1]['count'] . ")</p></td>\n
  <td width=\"300\"><p>" 
$row_rsCategories['category_description']. "</p></td>\n
  <td width=\"145\"><p><a href=\"display_category.php?category_id=" 
$row_rsCategories['category_id'];. "\">View</a> | <a href="edit_category.php?category_id=" . $row_rsCategories['category_id'] . "">Edit</a> | <a href=\"javascript:BRB_PHP_DelWithCon('delete_category.php','category_id'," $row_rsCategories['category_id'] . ",'Are you sure you want to delete this category?');\">Delete</a></p></td>\n
</tr>\n"
;

}
?>

</table>
next post i'll recommend a different way of handling your situation.
sde is offline   Reply With Quote