Last active
November 24, 2024 12:37
-
-
Save s2ar/68f8a793bda664bf9480 to your computer and use it in GitHub Desktop.
bitrix.select elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Bitrix\Main\Loader; | |
if(!Loader::includeModule("iblock")) die(); | |
$aFilter = array("IBLOCK_ID"=>25, "ACTIVE"=>"Y"); | |
$rPart = CIBlockElement::GetList(array('sort'=>'ASC'), $aFilter, false, false, array()); | |
while($oPart = $rPart->GetNextElement()): | |
$aPart = $oPart->GetFields(); | |
$aPart['PROP'] = $oPart->GetProperties(); | |
var_dump($aPart['NAME']); | |
endwhile; | |
// Подсчитаем общее количество записей | |
$res = CIBlockElement::GetList($arSort, array_merge($arFilter, $arrFilter), false, false, array()); | |
$count = $res->SelectedRowsCount(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment