foreach ($arResult["ITEMS"] as &$arItem) {
$tags = array();
foreach ($arItem['PROPERTIES'] as $prop) {
// Убираем пустые свойства и массивы
if (!empty($prop['VALUE'] && !is_array($prop['VALUE']))) {
$url = CHTTP::urlAddParams(
$arParams["SEARCH_PAGE"],
array(
"prop" => $prop['VALUE'],
),
array(
"encode" => true,
)
);
$tags[] = '<a href="'.$url.'">'.$prop['VALUE'].'</a>';
}
}
$arItem["FIELDS"]["TAGS"] = implode(", ", $tags);
}