$arFilter = array('IBLOCK_ID' => $IBLOCK_ID, 'ACTIVE' => 'Y'); $arSelect = array('ID', 'NAME'); $rsSection = CIBlockSection::GetTreeList($arFilter, $arSelect); while($arSection = $rsSection->Fetch()) { echo ' - '.$arSection['NAME'].'<br>'; }
$tree = CIBlockSection::GetTreeList( $arFilter=Array('IBLOCK_ID' => $iblock['ID']), $arSelect=Array() ); while($section = $tree->GetNext()) { }