Для элементов инфоблоков
$arSelect = array( 'ID', 'NAME', 'SORT', 'IBLOCK_ID' );
$arFilter = array("ID" => $arrId, "IBLOCK_ID" => 10);
$rsElement = CIBlockElement::GetList(Array("SORT"=>"ASC"), $arFilter, false, false, $arSelect);
$count = $rsElement->SelectedRowsCount();
while($data = $rsElement -> Fetch())
{
deb($data);
}
Для секций инфоблоков
$arSelect = array( 'ID', 'NAME', 'SORT', 'IBLOCK_ID' );
$arFilter = array("ID" => $arrId, "IBLOCK_ID" => 10);
$rsSection = CIBlockSection::GetList(Array("SORT"=>"ASC"), $arFilter, false, $arSelect);
while($data = $rsSection -> Fetch())
{
deb($data);
}