GetByID
array CBlogCategory::GetByID( int ID );
The method returns the parameters of a category with the ID. Non-static method.
Method parameters
Parameter | Description |
---|---|
ID | Category ID. |
Returned value
Array of the following type is returned:Array( "ID" => "category ID", "BLOG_ID" => "blog ID", "NAME" => "category name" )If the category is not found, the method will return false.
Note
This method uses built-in caching. As a result, when the method is used multiple times on the page, the database request will be performed only once.
See Also
Examples of use
<? $ID = 1; $arCategory = CBlogCategory::GetByID($ID); if(is_array($arCategory)) print_r($arCategory); else echo "Category not found."; ?>
© «Bitrix24», 2001-2024