Documentation

CChapter::GetByID

CDBResult
CChapter::GetByID(
 int ID
);

The GetByID method returns a chapter record by its ID.

Parameters

ParameterDescription
ID The chapter ID.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • Chapter fields
  • CChapter::GetList

    Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $CHAPTER_ID = 97;
        
        $res = CChapter::GetByID($CHAPTER_ID);
    
        if ($arChapter = $res->GetNext())
        {
            echo "Name: ".$arChapter["NAME"];
        }
    }
    ?>
  • © «Bitrix24», 2001-2024
    Up