Step 2/4 - Choose your vote\n"; $result .= "
".$election["question"]."
\n"; $result .= "Possible answers:
\n"; $result .= "\n";
foreach ($choices as $choice) {
$checked = "";
if ($choice["id"] == $vote) {
$checked = " checked=\"checked\"";
}
$result .= " ".$choice["choice"]."
\n";
}
$result .= "
\n";
foreach ($choices as $choice) {
$checked = "";
if (in_array ($choice["id"], $votes_array)) {
$checked = " checked=\"checked\"";
}
$result .= " ".$choice["choice"]."
\n";
}
$result .= "
You can choose up to ".$choices_nb." answers.
\n"; return $result; } ?>