V
V
Vladimir2017-05-16 14:35:25
1C-Bitrix
Vladimir, 2017-05-16 14:35:25

How to compare the title of one infoblock with the name of the element of another infoblock?

Hello. I need to make a filter on a site on Bitrix.
If the section name of ONE infoblock = TEST, then display the elements of ANOTHER infoblock with the TEST property.
I display the elements through bitrix news list (Infoblock 4)
A Section name (Infoblock 2)

<?
$rs_Section = CIBlockSection::GetList(array('sort' => 'asc'), array('IBLOCK_ID' => 2));
while ( $ar_Section = $rs_Section->Fetch() )
{
  $ar_Result[] = array(
    'ID' => $ar_Section['ID'],
    'NAME' => $ar_Section['NAME'],
  );
}
?>
<?
foreach( $ar_Result as $ar_Value )
{
//echo $ar_Value['NAME'];
}
?>

How can I compare now?
<?=$arItem["DISPLAY_PROPERTIES"]["TYPE"]["VALUE"];?> (свойство элемента инфоблока 4) и
$ar_Value['NAME']; (название раздела)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question