A
A
Anton2018-04-18 11:32:56
1C-Bitrix
Anton, 2018-04-18 11:32:56

How to remove duplicate values ​​in while results?

<!-- Функции -->
<?
if (CModule::IncludeModule("iblock")):
$iblock_id = 8;
$my_slider = CIBlockElement::GetList (
Array("CATALOG_QUANTITY" => "ASC"),
Array('ACTIVE' => 'Y', "IBLOCK_ID" => $iblock_id, 
"SECTION_ID" => 2170, "INCLUDE_SUBSECTIONS" => "Y",
"PROPERTY_SERIAL_VALUE" => "",
">=CATALOG_QUANTITY" => 1,
"!PROPERTY_SERIAL_VALUE" =>false
),
false,
false,
Array(
'NAME',
'CATALOG_PRICE_1',
'CATALOG_GROUP_1',
'CATALOG_QUANTITY',
'PROPERTY_SERIAL'
)
);
while($ar_fields = $my_slider->GetNext())
{
//echo '</br>'.$ar_fields['NAME'];
//echo '</br>'.$ar_fields['CATALOG_QUANTITY'];
echo '</br>'.$ar_fields['PROPERTY_SERIAL_VALUE'];
}
endif;?>

Hundreds of values ​​are displayed in echo PROPERTY_SERIAL_VALUE, how to remove duplicates and display only unique values ​​in echo?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question