So.
You have variables $ans1, $ans2, $ans3, ... , $ansx
Where $ans1 is Yes or No.
You want to loop through the answers?
for ($id = 1 ; $id <= iMaxIDs ; $id++)
{
$ans = "ans$id";
if ($$ans == "Yes") {}
else {}
}
I think should do the trick.
The $$ans means use the content of the variable $ans as a variable in its own right.
Good luck,
Richard Quadling.