Good day!

How to set a filter for a component by property snapping to an element? I derived the arResult array, I found the [CITY] array in it, the desired [VALUE] property, I tried to write this:

$arrFilter = array("PROPERTY_CITY_VALUE"=>$userCity); 

but apparently something is wrong. Filter in component settings is enabled.

    1 answer 1

     $arrFilter = array("=PROPERTY_CITY" => $userCity/*тут должно быть число — ID элемента*/); 
    • $arrFilter = array("=PROPERTY_CITY" => 70); 70 is the value of one of the cities, did not work, just displays everything - Ivan Bubliy
    • global $ arrFilter; made? - Mihanik71