Skip to content

Instantly share code, notes, and snippets.

@webmstk
Created January 16, 2017 09:36
Show Gist options
  • Save webmstk/6043301c5c77e31de09ede51710cf38d to your computer and use it in GitHub Desktop.
Save webmstk/6043301c5c77e31de09ede51710cf38d to your computer and use it in GitHub Desktop.
<?require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php';?>
<?
\Bitrix\Main\Loader::includeModule('iblock');
$ar = array();
$arFilter = array(
'IBLOCK_ID' => IBLOCK_REVIEWS_ID,
'ACTIVE' => 'Y',
'>DATE_CREATE' => date($DB->DateFormatToPHP(CLang::GetDateFormat('SHORT')), mktime(0,0,0,12,25,2016))
);
$res = CIBlockElement::GetList(array('sort' => 'asc'), $arFilter);
while($ob = $res->GetNextElement())
{
$arFields = $ob->GetFields();
$arProps = $ob->GetProperties();
$arItem = array();
// pre($arFields);
// pre($arProps);
$arItem['NAME'] = $arFields['NAME'];
$arItem['TEXT'] = $arFields['DETAIL_TEXT'];
$arItem['DATE_CREATE'] = $arFields['DATE_CREATE'];
$arItem['EMAIL'] = $arProps['EMAIL']['VALUE'];
$ar[] = $arItem;
}
pre($ar);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment