The code displays the numbers as expected:
<?$sticker = ""; if (array_key_exists("PROPERTIES", $arResult) && is_array($arResult["PROPERTIES"])) { foreach (Array("STOCK" => "Акция", "INFICTION"=>"") as $propertyCode => $propertyCodeName) if (array_key_exists($propertyCode, $arResult["PROPERTIES"]) && intval($arResult["PROPERTIES"][$propertyCode]["PROPERTY_VALUE_ID"]) > 0) { $arFiltrum = $arResult["PROPERTIES"]['INFICTION']["VALUE_XML_ID"]; if($propertyCode == "STOCK") $sticker .= '<span class="xit" style="font-size:20px;"'; if(in_array("INF1",$arFiltrum)) $sticker .= "1"; if(in_array("INF2",$arFiltrum)) $sticker .= "2"; if(in_array("INF3",$arFiltrum)) $sticker .= "3"; if(in_array("INF4",$arFiltrum)) $sticker .= "4"; if(in_array("INF5",$arFiltrum))$sticker .= "5"; $sticker .= '>'.$propertyCodeName.'</span>'; } } ?> The value in each (in_array("INF1-INF5",$arFiltrum)) is true . But if I insert instead of numbers, I try to insert pictures
$sticker .= '<span class="xits" style="font-size:20px; background: url(/tamp.png) 1px -1px no-repeat;left:70px;"'; $sticker .= '<span class="xits" style="font-size:20px; background: url(/gravirovka.png) 1px -1px no-repeat;"'; $sticker .= '<span class="xits" style="font-size:20px; background: url(/uf_print.png) 1px -1px no-repeat;"'; $sticker .= '<span class="xits" style="font-size:20px; background: url(/sticker.png) 1px -1px no-repeat;"'; $sticker .= '<span class="xits" style="font-size:20px; background: url(/label.png) 1px -1px no-repeat;"'; That only displays the first picture. Problems with styles disappear, because without conditions all pictures are displayed normally.
ifin PHP does not work correctly? - VladD