In mod3.php you need to initialize the array $svarsalt
for every question, otherwise when you have for
instance first a question with 4 possible answers and
thereafter a question with only 3 possible answers,
this last question will be shown with 4 possible
answers. Indeed, the 4th possible reply is still
stored in $svarsalt...
Fix:
Add
$svarsalt = array();
just before the lines:
$x = explode("\n",$sv[$i]);
for ($j = 0; $j < count($x); $j++):
...
Regards,
Wim Mees