$arFields = array( "ACTIVE" => "Y", "NAME" => "My Block", "CODE" => "my_block", "IBLOCK_ID" => 1, "PROPERTY_VALUES" => array( "DESCRIPTION" => "This is my first block", "CONTENT" => "Hello, world!" ) ); $el = new CIBlockElement; $el->Add($arFields);
$blockId = 100; // Element ID of the content block $arFields = array( "NAME" => "New Name", "PROPERTY_VALUES" => array( "CONTENT" => "Updated content" ) ); $el = new CIBlockElement; $el->Update($blockId, $arFields);
$blockId = 100; // Element ID of the content block $el = new CIBlockElement; $el->Delete($blockId);The PHP CIBlock library is part of the Bitrix CMS package.