The page "Current survey" was added on the page, which displays all the questions from the list of polls. Tell me how to display the last question.
This cycle is responsible for the conclusion:
<? foreach ($arResult["QUESTIONS"] as $k =>$arQuestion): $iCount++;?> <p><?= $arQuestion["QUESTION"] ?></p> <ul> <? $iCountAnswers = 0; foreach ($arQuestion["ANSWERS"] as $arAnswer): $iCountAnswers++; ?> <li> <? switch ($arAnswer["FIELD_TYPE"]): case 0://radio $value = (isset($_REQUEST['vote_radio_' . $arAnswer["QUESTION_ID"]]) && $_REQUEST['vote_radio_' . $arAnswer["QUESTION_ID"]] == $arAnswer["ID"]) ? 'checked="checked"' : ''; break; case 1://checkbox $value = (isset($_REQUEST['vote_checkbox_' . $arAnswer["QUESTION_ID"]]) && array_search($arAnswer["ID"], $_REQUEST['vote_checkbox_' . $arAnswer["QUESTION_ID"]]) !== false) ? 'checked="checked"' : ''; break; case 2://select $value = (isset($_REQUEST['vote_dropdown_' . $arAnswer["QUESTION_ID"]])) ? $_REQUEST['vote_dropdown_' . $arAnswer["QUESTION_ID"]] : false; break; case 3://multiselect $value = (isset($_REQUEST['vote_multiselect_' . $arAnswer["QUESTION_ID"]])) ? $_REQUEST['vote_multiselect_' . $arAnswer["QUESTION_ID"]] : array(); break; case 4://text field $value = isset($_REQUEST['vote_field_' . $arAnswer["ID"]]) ? htmlspecialcharsbx($_REQUEST['vote_field_' . $arAnswer["ID"]]) : ''; break; case 5://memo $value = isset($_REQUEST['vote_memo_' . $arAnswer["ID"]]) ? htmlspecialcharsbx($_REQUEST['vote_memo_' . $arAnswer["ID"]]) : ''; break; endswitch; ?> <? switch ($arAnswer["FIELD_TYPE"]): case 0://radio ?> <input type="radio" <?= $value ?> name="vote_radio_<?= $arAnswer["QUESTION_ID"] ?>" <? ?>id="vote_radio_<?= $arAnswer["QUESTION_ID"] ?>_<?= $arAnswer["ID"] ?>" <? ?>value="<?= $arAnswer["ID"] ?>" /> <?= $arAnswer["MESSAGE"] ?> <? break; endswitch; ?> </li> <? endforeach ?> </ul> <?endforeach?>
<?= end($arQuestion["QUESTION"]);?>
But how it did not help, how to fix it? - ChromeChromevar_dump($arQuestion["QESTION"]
do it - Naumov