Created
February 17, 2020 09:05
-
-
Save MasterHans/d7b1d156492d1b4a38c1151e5262558b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Получить массив значаний свойства элемента инфоблока | |
*/ | |
function getArrayOfPropertyValues($ELEMENT_ID, $PROPERTY_CODE) | |
{ | |
$arrValues = []; | |
//Получаем значение свойств инфоблока | |
$db_props = CIBlockElement::GetProperty( | |
MAIN_CATALOG_IB_ID, | |
$ELEMENT_ID, | |
array("sort" => "asc"), | |
array("CODE" => $PROPERTY_CODE) | |
); | |
while ($ar_props = $db_props->Fetch()) { | |
if (!is_null($ar_props["VALUE"])) { | |
$arrValues[] = $ar_props["VALUE"]; | |
} | |
} | |
return $arrValues; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment