Шпаргалка: Вывод разделов инфоблока в таблице (table>tr>td)

Код template.php:
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$this->setFrameMode(true);?>

<table>

   <?foreach ($arResult['SECTIONS'] as $cell=>&$arSection):?> 
      <?$this->AddEditAction($arSection['ID'], $arSection['EDIT_LINK'], $strSectionEdit); 
      $this->AddDeleteAction($arSection['ID'], $arSection['DELETE_LINK'], $strSectionDelete, $arSectionDeleteParams);?>  
      <?if($cell%3 == 0):?><tr><?endif;?> 

      <td id="<? echo $this->GetEditAreaId($arSection['ID']); ?>" width="33%" align="center" valign="top"><!-- СОДЕРЖИМОЕ ЯЧЕЙКИ --></td> 

      <?$cell++;if($cell%3 == 0):?></tr><?endif?>
   <?endforeach;?>

   <?if($cell%$arParams["LINE_ELEMENT_COUNT"] != 0):?>
      <?while(($cell++)%$arParams["LINE_ELEMENT_COUNT"] != 0):?>
         <td>&nbsp;</td>
      <?endwhile;?>
      </tr>
   <?endif?>
</table>