while ($arItems = $dbBasketItems->Fetch())
{
if (strlen($arItems["CALLBACK_FUNC"]) > 0){
CSaleBasket::UpdatePrice($arItems["ID"],
$arItems["CALLBACK_FUNC"],
$arItems["MODULE"],
$arItems["PRODUCT_ID"],
$arItems["QUANTITY"]);
$arItems = CSaleBasket::GetByID($arItems["ID"]);
}
$arBasketItems[] = $arItems;
echo $arItems["PRODUCT_ID"].', '; //значения ID, покажет 1,2, 3, 4, 5,
$arItems["PRICE"];
}
1, 2, 3, 4, 5
$list = [];
while ($arItems = $dbBasketItems->Fetch())
{
if (strlen($arItems["CALLBACK_FUNC"]) > 0)
{
CSaleBasket::UpdatePrice($arItems["ID"],
$arItems["CALLBACK_FUNC"],
$arItems["MODULE"],
$arItems["PRODUCT_ID"],
$arItems["QUANTITY"]);
$arItems = CSaleBasket::GetByID($arItems["ID"]);
}
$arBasketItems[] = $arItems;
$list[] = $arItems["PRODUCT_ID"];
//echo $arItems["PRODUCT_ID"].', ';
};
$count_temp = count($arItems);
$art = $arItems["PRODUCT_ID"] .= implode(', ', $list);
echo $art;
$ids = implode(", ", $arItems["PRODUCT_ID"]);
$sum = array_sum($arItems["PRICE"]);