I have a section in my footer from a script, that I am trying to customize and that displays the website categories.
Currently the results were limited to 9 results per column and continuing onto x amounts of columns. I need to be able to stop at 2 columns.
Here is the code I have
<div class="left">
<h3 style="padding-top:15px;"><?php echo BROWSE_CATEGORIES; ?></h3>
<?php $footer_category= $this->home_model->get_category(); ?>
<?php if($footer_category) { $ftr_cnt=1; ?>
<ul>
<?php foreach($footer_category as $cat) {
echo '<li>'.anchor('search/category/'.$cat->project_category_id,substr($cat->project_category_name,0,30)).'</li>';
if($ftr_cnt>9) { $ftr_cnt=1; echo "</ul><ul>"; }
$ftr_cnt++;
}
} ?>
</ul>
</div>
$ftr_cnt>9to$ftr_ctn>2?