if CModule IncludeModule catalog echo pre arSelect Array ID IBLOCK_ID

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?
if(CModule::IncludeModule("catalog")){
echo "<pre>";
$arSelect = Array("ID", "IBLOCK_ID", "NAME","SHOW_COUNTER", "PROPERTY_rating");//IBLOCK_ID и ID обязательно должны быть указаны, см. описание arSelectFields выше
$arFilter = Array("IBLOCK_ID"=>IntVal(114), "ACTIVE"=>"Y" );
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array(), $arSelect);
$x = 0;
while($ob = $res->GetNextElement()){
$arFields = $ob->GetFields();
var_dump($arFields);
$x++;
}
echo " ----- ".$x;
echo "</pre>";
}
?>