Documentation

GetByID

CDBResult
CIBlockProperty::GetByID(
 mixed ID,
 int IBLOCK_ID = false, 
 string IBLOCK_CODE = false
);

Returns a property by its ID.

Parameters

ParameterDescription
ID Numeric or mnemonic property ID.
IBLOCK_ID Information block ID. Used to locate a property more precisely if a property ID is the mnemonic code shared between properties of several information blocks.
IBLOCK_CODE Information block mnemonic code. Serves the same purpose as the IBLOCK_ID.

Return Values

Returns an instance of CDBResult.

Remarks

If both IBLOCK_ID and IBLOCK_CODE are passed, the method attempts searches in either of them ("OR").

See Also

  • CDBResult
  • Property fields

    Example


    <?
    $res = CIBlockProperty::GetByID("SRC", false, "company_news");
    if($ar_res = $res->GetNext())
      echo $ar_res['NAME'];
    ?>
  • © «Bitrix24», 2001-2024