Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach($array_sections as $section) {
- $sectionObject = new CIBlockSection;
- $sectionId = $sectionObject->Add([
- 'IBLOCK_ID' => $iblock_id,
- 'IBLOCK_SECTION_ID' => '',
- "NAME" => $section['NAME'],
- "CODE" => $section['CODE'].'_non',
- ]);
- if($sectionId > 0){
- $sectionObject->Update($sectionId, [
- 'IBLOCK_ID' => $iblock_id,
- 'IBLOCK_SECTION_ID' => '',
- "NAME" => $section['NAME'],
- "CODE" => $section['CODE'].'_non',
- ]);
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement