GetByID
CDBResult CIBlockProperty::GetByID( mixed ID, int IBLOCK_ID = false, string IBLOCK_CODE = false );
Returns a property by its ID.
Parameters
Parameter | Description |
---|---|
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
Example
<? $res = CIBlockProperty::GetByID("SRC", false, "company_news"); if($ar_res = $res->GetNext()) echo $ar_res['NAME']; ?>
© «Bitrix24», 2001-2024