Jump to content

Recommended Posts

Hi Guys,

 

i can display my categories fine using this code:

 

        echo '<br />
              <table width="750" border="2" bordercolor="#004E98" cellpadding="5" cellspacing="0">
              <tr>
              <td colspan="5" bgcolor="#004E98"><img src="images/browse_categories.bmp"></td>
              </tr>';

        while ($category = mysql_fetch_assoc($query_browse)) {
            
        $cat_id_gif = $category['id'];
        
            if ($count == 5) { 
            
                echo '<tr>';
                
                $count = 0;
                
            }
        
        echo '<td class="release" align="release"><b><a href="browse.php?cat_id='.$category['id'].'">'.$category['name'].'</b></a></td>';
            
                $count++;  
          
            }
            
        echo '</tr></table>';

 

only thing is say i have 2 table cells empty, in firefox its a jumbled mess , it better in interntet exlorer just, basically i need to place a:   to fill up the empty cell to keep it stable but im not sure where in the code to do it

 

any help would be appreciated

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/67803-solved-displaying-categories/
Share on other sites

...
  echo '<td class="release" align="release"><b><a href="browse.php?cat_id='.$category['id'].'">'.$category['name'].'</b></a></td>';
  $count++;  
}
//insert line
if($count > 1) for($I = $count; $i <= 5; $i++)echo '<td> </td>';
            
echo '</tr></table>';

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.