function display_category_usa($type = "all", $linkurl = 'subcategory.php', $selected = "") { $project = new project(); $service = new service(); $rentorhire = new rentorhire(); $jobs = new jobs(); $category = $this->getsubcategory(1); if (is_array($category)) { echo '<table cellspacing="4" class="sub_categories" width="100%">'; echo '<tr>'; $countTd = 0; foreach ($category as $row) { if ($countTd % 4 == 0 && $countTd > 1) { echo "</tr><tr>"; } $countTd++; echo '<td '; if ($type == "jobs" && $selected == $row['seo_url']) { echo "class='redBg'"; } else { echo "class='whiteBg'"; } echo ' ><div><div><a href="' . $linkurl . '?seo_url=' . $row['seo_url'] . '" style="text-decoration:none;">'; if ($row['markbold'] == "yes") { echo "<strong>" . $row['name'] . "</strong> "; } else { echo $row['name'] . " "; } echo "<font color='green'>"; if ($type == "services") { echo $service->numofServicebysubCat($row['id']); } else { if ($type == "rentorhire") { echo $rentorhire->numofrentorhirebysubCat($row['id']); } else { if ($type = "jobs") { echo $jobs->numofjobsbysubCat($row['id']); } else { if ($type == "all") { echo $project->numOfProjectBySubCat($row['id']) . "," . $rentorhire->numofrentorhirebysubCat($row['id']) . "," . $jobs->numofjobsbysubCat($row['id']) . "," . $service->numofServicebysubCat($row['id']); } } } } echo "</font>"; echo '</a></div></div></td>'; //if($countTd%4!=0) echo '<td width="20"></td>'; } echo '</tr>'; echo '</table>'; } else { echo "No Sub Category Found!"; } }