The code is following can anyone tell me how to show in three column
this code show one column of the categories.
<?php
//don't allow other scripts to grab and execute our file
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
//$letters_x_row = 12;
$db =& JFactory::getDBO();
$query = " SELECT * FROM #__js_job_categories";
$db->setQuery($query);
$rows = $db->loadRowList();
?>
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $mainframe->getBasePath(); ?>components/com_jsjobs/css/<?php echo $this->config; ?>" />
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane">
<?php
$tdclass = array($this->theme, $this->theme);
$rowcount=1;
$istr =1;
$isodd =1;
$tdcount = 4;
$i = 0;
foreach($rows as $row)
{
$isodd = 1 - $isodd;
if ($tdcount==4){
echo " <tr >";
$tdcount = 1;
}
$istr = 1 - $istr;
?>
<tr>
<td width="33%" class="<?php echo $tdclass[$isodd]; ?>" align="left">
<a href="index.php?option=com_jsjobs&c=jsjobs&view=jobseeker&layout=list_jobs&fr=lj&jobcat=<?php echo $row[0] ?>&Itemid=<?php echo $this->Itemid; ?>"><?php echo $row[2] ?></a>
</td>
</tr>
<?php
if ($tdcount==3){
echo ' </tr>';
$isodd = 1 - $isodd;
}
$rowcount = $rowcount+1;
$tdcount++;
}
if ($tdcount!=3)
echo ' <td></td></tr>';
?>
</table>