tr td php cats get_categories foreach array cats as cat if cat- parent

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<tr>
<td>
<?php
$cats = get_categories();
foreach ((array)$cats as $cat) {
if ($cat->parent==N)
echo '<a href="' . get_category_link($cat->cat_ID) . '">' . $cat->cat_name . '</a> ';
}
?>
</td>
</tr>