<?
$FORM_ID = 4; // The web form ID
// build the filter array
$arFilter = Array(
"ID" => "1 | 4", // status ID=1 or ID=4
"ID_EXACT_MATCH" => "Y", // we need the ID to match exactly
"ACTIVE" => "Y", // active state flag
"TITLE" => "published", // title
"TITLE_EXACT_MATCH" => "N", // we need the TITLE to match exactly
"DESCRIPTION" => "final status", // description
"DESCRIPTION_EXACT_MATCH" => "N", // we need the DESCRIPTION to match exactly
);
// obtain the list of all answers to the question #143
$rsStatuses = CFormStatus::GetList(
$FORM_ID,
$by="s_id",
$order="desc",
$arFilter,
$is_filtered
);
while ($arStatus = $rsStatuses->Fetch())
{
echo "<pre>"; print_r($arStatus); echo "</pre>";
}
?>