<select class="drop" id="regionDropdown">
<option value="All">Показать все</option>
<?foreach($arResult["ITEMS"] as $arItem):?>
<?if(!empty($arItem['DISPLAY_PROPERTIES']['FILM_TYPES']['VALUE'])):?>
<option value="<?=$arItem['DISPLAY_PROPERTIES']['FILM_TYPES']['DISPLAY_VALUE'];?>"><? endif; ?><?=$arItem['DISPLAY_PROPERTIES']['FILM_TYPES']['DISPLAY_VALUE'];?></option>
<? endif; ?>
<? endforeach; ?>
</select>
if($arResult['ITEMS']) {
$arResult['FILE_TYPES'] = $filmTypes = [];
foreach($arResult['ITEMS'] as $key => $arItem) {
$filmTypesProp = isset($arItem['DISPLAY_PROPERTIES']['FILM_TYPES']) ? $arItem['DISPLAY_PROPERTIES']['FILM_TYPES'] : false;
$value = $filmTypesProp && $filmTypesProp['VALUE'] ? $filmTypesProp['VALUE'] : false;
$displayValue = $filmTypesProp && $filmTypesProp['DISPLAY_VALUE'] ? $filmTypesProp['DISPLAY_VALUE'] : false;
if($value && $displayValue) {
$filmTypes['VALUE'][] = $value;
$filmTypes['DISPLAY_VALUE'][] = $displayValue;
}
}
$arResult['FILE_TYPES'] = [
'VALUE' => array_values(array_unique($filmTypes['VALUE'])),
'DISPLAY_VALUE' => array_values(array_unique($filmTypes['DISPLAY_VALUE'])),
];
}
<?if(isset($arResult['FILE_TYPES']) && $arResult['FILE_TYPES']):?>
<select class="drop" id="regionDropdown">
<option value="All">Показать все</option>
<?foreach($arResult['FILE_TYPES']['DISPLAY_VALUE'] as $value):?>
<option value="<?=$value;?>"><?=$value;?></option>
<?endforeach;?>
</select>
<?endif;?>