Skip to content

Instantly share code, notes, and snippets.

@demoriz
Last active October 9, 2018 15:58
Show Gist options
  • Save demoriz/40ef12665daf7f51654d656dbfddd67f to your computer and use it in GitHub Desktop.
Save demoriz/40ef12665daf7f51654d656dbfddd67f to your computer and use it in GitHub Desktop.
bitrix 'iblock element add'
<?php
use Bitrix\Main\Loader;
Loader::includeModule('iblock');
$element = new CIBlockElement;
$arFields = array(
'NAME' => '',
'IBLOCK_ID' => '',
'ACTIVE' => '',
'PROPERTY_VALUES' => array()
);
$intID = $element->Add($arFields);
$strError = $element->LAST_ERROR;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment