Catagory_List(); $cnt = $db1->num_rows(); $i = 0; $col=0; while($db1->next_record()) { if($col==7) $col=0; $arr_cat[$i]['id'] = $db1->f('cat_id'); $arr_cat[$i]['name'] = $db1->f('cat_name'); $arr_cat[$i]['total_projects'] = $db1->f('total_projects'); $arr_cat[$i]['col'] = $col; $i++; $col++; } $navigation= ''; $tpl->assign(array( "T_Body" => 'category_list'. $config['tplEx'], "arr_cat" => $arr_cat, "Loop" => $cnt, "lang" => $lang, "navigation" => $navigation, )); $tpl->display('default_layout'. $config['tplEx']); ?>