Answer the question
In order to leave comments, you need to log in
How to programmatically remove a binding to a section?
Good evening!
You need to remove the current link to the section
. Here is part of the code
$dbOldGroups = CIBlockElement::GetElementGroups($arFields["ID"], true);
while($arGroup = $dbOldGroups->Fetch())
{
$allGroup[]=$arGroup["ID"];
}
/*ЧАСТЬ КОДА*/
{
if(array_search($rasp["ID"],$allGroup))
{
unset($allGroup[in_array($rasp["ID"],$allGroup)]);
}
}
CIBlockElement::SetElementSection($arFields["ID"], $allGroup);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question