$sql = $vbulletin->db->query_read("SELECT * FROM `" . TABLE_PREFIX . "download_cats` WHERE cat_active = '1'"); $total = $vbulletin->db->num_rows($sql); $i=0; $perrow = $total-2; while ($row = $db->fetch_array($sql)) { $i++; if ($total !== 0) { if ($total > $perrow){ $catc = '</td>'; $perrow = $perrow+2; } else { $perrow = $perrow-2; $catc = '</td></tr><tr>'; }
</td></td></tr><tr>