Bitrix Site Manager

CLAnswer::GetByID

CDBResult
CLAnswer::GetByID(
 int ID
);

The GetByID method returns an answer by the ID.

Parameters

ParameterDescription
ID The answer ID.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • Answer fields
  • CLAnswer::GetList
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $ANSWER_ID = 573;
        
        $res = CLAnswer::GetByID($ANSWER_ID);
    
        if ($arAnswer = $res->GetNext())
        {
            echo "Name: ".$arAnswer["ANSWER"];
        }
    }
    ?>