Answer the question
In order to leave comments, you need to log in
How to display the subsection name in Bitrix?
Hello. Help, pliz
<?
$IBLOCK_ID = 5;
$arFilter = Array(
'IBLOCK_ID'=>$IBLOCK_ID,
'ACTIVE'=>'Y',
'DEPTH_LEVEL' => 3,
);
$rsResult = CIBlockSection::GetTreeList($arFilter);
while($arResult = $rsResult->GetNext()){
$arResult["ID"] = $hi;
}
?>
<?foreach ($arResult["ID"] as $hi) {?>
<?=$hi;?> //не работает
<?}?>
Answer the question
In order to leave comments, you need to log in
<?
$IBLOCK_ID = 5;
$arFilter = Array(
'IBLOCK_ID'=>$IBLOCK_ID,
'ACTIVE'=>'Y',
'DEPTH_LEVEL' => 3,
);
$rsResult = CIBlockSection::GetTreeList($arFilter);
while($arSection = $rsResult->GetNext()){
$arResult["ID"][] = $arSection;
}
?>
<?foreach ($arResult["ID"] as $hi) {?>
<? print_r($hi); ?> //не работает
<?}?>
Add somewhere above:
And it will become a little clearer. And so at a "look":
You assign an undeclared variable in a loop to each element:
while($arResult = $rsResult->GetNext()){
$arResult["ID"] = $hi;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question