A
A
Alex2017-05-26 13:27:59
1C-Bitrix
Alex, 2017-05-26 13:27:59

How to get the id value in the list infoblock type?

Good afternoon, there is an infoblock type a list with a multiple value,
fb42044eef0f4466b0dc10f790e96aaf.png
I output it like this

<DIV>

 <?php if ($arItem["PROPERTIES"]["SERVICES"]["VALUE"]) {?> 
  
 <strong>Сервис:</strong> 
 <? if(is_array($arItem["PROPERTIES"]["SERVICES"]["VALUE"])) 
    echo implode(" / ", $arItem["PROPERTIES"]["SERVICES"]["VALUE"]); 
  
     	else 
    echo $arItem["PROPERTIES"]["SERVICES"]["VALUE"];?><br /> 
   
  <?php } 
 
  else { ?>
 
<?php }?>
  
</DIV>

So here's how to make a condition by ID or XML_ID that insert a picture into each value. Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DeclanBartowski, 2017-05-26
@DeclanBartowski

print var_dump
($arItem["PROPERTIES"]["SERVICES"])
and you should see id/xmlid in this array

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question