GetProperty
array _CIBElement::GetProperty( mixed ID );
The method returns the property parameters and its values for this information block element.
Parameters
Parameter | Description |
---|---|
ID | Numeric (ID) or mnemonic code of the property to return. |
Return Values
The method returns the property fields array and the additional keys and values:
- "VALUE" => "property value or an array for a multiple property";
- "VALUE_ENUM_ID" => "option ID for the LIST properties (array or a single value)";
- "DESCRIPTION" => "property value description (array or a single value)";
- "PROPERTY_VALUE_ID" => "property value ID (array or a single value)"
See Also
Example
<? $res = CIBlockElement::GetByID($_GET["PID"]); if($obRes = $res->GetNextElement()) { $ar_res = $obRes->GetProperty("PHOTOS"); print_r($ar_res); } ?>
Sample output:
Array ( [ID] => 388 [TIMESTAMP_X] => 20050119162457 [IBLOCK_ID] => 11 [NAME] => Photos with description [ACTIVE] => Y [SORT] => 500 [CODE] => [DEFAULT_VALUE] => [PROPERTY_TYPE] => F [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => Y [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID] => [WITH_DESCRIPTION] => Y [LINK_IBLOCK_ID] => 0 [VALUE_TYPE] => text [VALUE_ENUM] => [VALUE] => Array ( [0] => 2311 ) [~VALUE] => Array ( [0] => 2311 ) [DESCRIPTION] => Array ( [0] => Descr ) [~DESCRIPTION] => Array ( [0] => Descr ) [PROPERTY_VALUE_ID] => Array ( [0] => 53865 ) [~NAME] => Photos with description [~DEFAULT_VALUE] => )
© «Bitrix24», 2001-2024