How to get in Bitrix ID of the main section if the element is in the subsection?

There is a information block, in this sections, their subsections, in which the elements.

Infoblok
Section
Podrazil
Item
Section
Podrazil
 The element, etc.


I get only get the ID of the subsection, and to obtain the partition ID?

I get this:
$arSelect = array(
"ID",
"NAME",
"DETAIL_PAGE_URL",
"IBLOCK_SECTION_ID"

 );


This file result_modifier.php here is the full file https://jsfiddle.net/dheha8kp/
Please help me, I'm still studying Bitrix
June 10th 19 at 16:20
2 answers
June 10th 19 at 16:22
Solution
$ res = CIBlockSection :: GetByID ($ arElement ["IBLOCK_SECTION_ID"]);
if ($ ar_res = $ res-> GetNext ())
print_r($ ar_res);

So if you look
June 10th 19 at 16:24
As I understand it You work with the detailed item page (news, products or something like that)?

To select the path along the tree of partitions is the method CIBlockSection::GetNavChain.

Find more questions by tags 1C-Bitrix