<?
$QUESTION_ID = 143; // the question ID
// form the filter array
$arFilter = Array(
// the answer ID is 589 or 590
"ID" => "589 | 590",
// we need the ID to match exactly
"ID_EXACT_MATCH" => "Y",
// active state flag
"ACTIVE" => "Y",
// the value of the ANSWER_TEXT parameter is "yes" or "no"
"MESSAGE" => "yes | no",
// we need the MESSAGE to match exactly
"MESSAGE_EXACT_MATCH" => "Y",
// type of the answer field is radio-button
"FIELD_TYPE" => "radio",
// we need the FIELD_TYPE to match exactly
"FIELD_TYPE_EXACT_MATCH" => "Y",
// parameter includes the string "checked"
"FIELD_PARAM" => "checked",
// we need just an entry in FIELD_PARAM
"FIELD_PARAM_EXACT_MATCH" => "N"
);
// obtain the list of all answers to the question #143
$rsAnswers = CFormAnswer::GetList(
$QUESTION_ID,
$by="s_id",
$order="desc",
$arFilter,
$is_filtered
);
while ($arAnswer = $rsAnswers->Fetch())
{
echo "<pre>"; print_r($arAnswer); echo "</pre>";
}
?>