Есть массив $arResult["arClinics"], например:
Array
(
[0] => Array
(
[ID] => 10882
[~ID] => 10882
[PROPERTY_SPECIALIZATIONS_VALUE] => Array
(
)
[~PROPERTY_SPECIALIZATIONS_VALUE] => Array
(
)
[PROPERTY_SPECIALIZATIONS_DESCRIPTION] => Array
(
)
[~PROPERTY_SPECIALIZATIONS_DESCRIPTION] => Array
(
)
[PROPERTY_SPECIALIZATIONS_PROPERTY_VALUE_ID] => Array
(
)
[~PROPERTY_SPECIALIZATIONS_PROPERTY_VALUE_ID] => Array
(
)
)
[1] => Array
(
[ID] => 10883
[~ID] => 10883
[PROPERTY_SPECIALIZATIONS_VALUE] => Array
(
)
[~PROPERTY_SPECIALIZATIONS_VALUE] => Array
(
)
[PROPERTY_SPECIALIZATIONS_DESCRIPTION] => Array
(
)
[~PROPERTY_SPECIALIZATIONS_DESCRIPTION] => Array
(
)
[PROPERTY_SPECIALIZATIONS_PROPERTY_VALUE_ID] => Array
(
)
[~PROPERTY_SPECIALIZATIONS_PROPERTY_VALUE_ID] => Array
(
)
)
[2] => Array
(
[ID] => 10884
[~ID] => 10884
[PROPERTY_SPECIALIZATIONS_VALUE] => Array
(
[0] => 11281
[1] => 11254
[2] => 10885
[3] => 10895
[4] => 10887
[5] => 10886
[6] => 10888
[7] => 21736
)
[~PROPERTY_SPECIALIZATIONS_VALUE] => Array
(
[0] => 11281
[1] => 11254
[2] => 10885
[3] => 10895
[4] => 10887
[5] => 10886
[6] => 10888
[7] => 21736
)
[PROPERTY_SPECIALIZATIONS_DESCRIPTION] => Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] =>
)
нужно из этого массива в ключах убрать переменные [PROPERTY_SPECIALIZATIONS_DESCRIPTION], [~PROPERTY_SPECIALIZATIONS_VALUE], [~PROPERTY_SPECIALIZATIONS_DESCRIPTION], [PROPERTY_SPECIALIZATIONS_DESCRIPTION], [~PROPERTY_SPECIALIZATIONS_VALUE] как это сделать?
Грубо говоря, чтобы новый массив был из переменных ID и [PROPERTY_SPECIALIZATIONS_VALUE]
Пытался сделать так, не выходит
foreach($arResult["arClinics"] as $key => $item){
$arResult["arClinics"]["ITEMS"] = $item["ID"];
$arResult["arClinics"]["ITEMS"] = $item["PROPERTY_SPECIALIZATIONS_VALUE"];
}