$res = CIBlockElement:GetList(Array("PROPERTY_rating", "DESC"), Array("IBLOCK_ID"=>3, "ACTIVE" =>"Y"), false, false, array("ID")); while($arRes = $res->GetNext()) { echo "<pre>"; print_r($arRes); echo "</pre>"; }