1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
/** * Получаем все брэнды */ function brand(){ $arSelect = Array("ID", "PROPERTY_46"); $arFilter = Array("IBLOCK_ID"=> 5, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y"); $res = CIBlockElement::GetList(Array(), $arFilter, false, false, $arSelect); $arr = array(); $i = 0; while($r = $res->GetNext()){ $arr[$r['PROPERTY_46_VALUE']] = $r['ID']; $i++; } return $arr; } |