Массив от битрикса, вывожу умный фильтр.
spoiler
Array
(
[44] => Array
(
[ID] => 44
[IBLOCK_ID] => 4
[CODE] => P_88172288_8c75_11e6_af60_001e67496364
[~NAME] => Бренд
[NAME] => Бренд
[PROPERTY_TYPE] => L
[USER_TYPE] =>
[USER_TYPE_SETTINGS] =>
[DISPLAY_TYPE] => F
[DISPLAY_EXPANDED] => Y
[FILTER_HINT] =>
[VALUES] => Array
(
[62] => Array
(
[CONTROL_ID] => ifFilter_44_1233418
[CONTROL_NAME] => ifFilter_44_1233418
[CONTROL_NAME_ALT] => ifFilter_44
[HTML_VALUE_ALT] => 1233418
[HTML_VALUE] => Y
[VALUE] => AUMA
[SORT] => 500
[UPPER] => AUMA
[FLAG] =>
[URL_ID] => a0a1ce5bc50945a844aaaa503d9a09b9
)
)
)
[220] => Array
(
[ID] => 220
[IBLOCK_ID] => 5
[CODE] => P_3ea07275_a385_11e7_a4e0_001e67496365
[~NAME] => Длина (мм)
[NAME] => Длина (мм)
[PROPERTY_TYPE] => N
[USER_TYPE] =>
[USER_TYPE_SETTINGS] =>
[DISPLAY_TYPE] => A
[DISPLAY_EXPANDED] =>
[FILTER_HINT] =>
[VALUES] => Array
(
[MIN] => Array
(
[CONTROL_ID] => ifFilter_220_MIN
[CONTROL_NAME] => ifFilter_220_MIN
[VALUE] => 288
)
[MAX] => Array
(
[CONTROL_ID] => ifFilter_220_MAX
[CONTROL_NAME] => ifFilter_220_MAX
[VALUE] => 864
)
)
)
[Розничная цена] => Array
(
[ID] => 2
[CODE] => Розничная цена
[URL_ID] => %D1%80%D0%BE%D0%B7%D0%BD%D0%B8%D1%87%D0%BD%D0%B0%D1%8F%20%D1%86%D0%B5%D0%BD%D0%B0
[~NAME] => Розничная цена
[NAME] => Розничная цена
[PRICE] => 1
[VALUES] => Array
(
[MIN] => Array
(
[CONTROL_ID] => ifFilter_P2_MIN
[CONTROL_NAME] => ifFilter_P2_MIN
[VALUE] => 128278.08
[CURRENCY] => RUB
)
[MAX] => Array
(
[CONTROL_ID] => ifFilter_P2_MAX
[CONTROL_NAME] => ifFilter_P2_MAX
[VALUE] => 470995.56
[CURRENCY] => RUB
)
)
[ENCODED_ID] => c81e728d9d4c2f636f067f89cc14862c
[CURRENCIES] => Array
(
[RUB] => Рубль
)
)
)
Есть последний элемент массива [Розничная цена],
Делаю foreach и последний элемент, который "розничная цена" не выводится, выводится предпоследний еще раз.
debug($arResult["ITEMS"] );
foreach($arResult["ITEMS"] as $key=>$arItem) {
debug($key);
debug($arItem);
}
Вывод последней итерации
spoiler
Розничная цена
Array
(
[ID] => 220
[IBLOCK_ID] => 5
[CODE] => P_3ea07275_a385_11e7_a4e0_001e67496365
[~NAME] => Длина (мм)
[NAME] => Длина (мм)
[PROPERTY_TYPE] => N
[USER_TYPE] =>
[USER_TYPE_SETTINGS] =>
[DISPLAY_TYPE] => A
[DISPLAY_EXPANDED] =>
[FILTER_HINT] =>
[VALUES] => Array
(
[MIN] => Array
(
[CONTROL_ID] => ifFilter_220_MIN
[CONTROL_NAME] => ifFilter_220_MIN
[VALUE] => 288
)
[MAX] => Array
(
[CONTROL_ID] => ifFilter_220_MAX
[CONTROL_NAME] => ifFilter_220_MAX
[VALUE] => 864
)
)
)
То есть ключ выводит правильный, а сам элемент нет...