I am printing question number with the correct answer as 1 and wrong answer as 0.
Now I would like to count how many correct answers for each question.
Example of this:
Question number: 8
00110
For this example there are two correct answer.
$scoree = 0;
$intt = 0;
$sqlll=question();
while($infoo = mysql_fetch_array( $sqlll)) {
echo "<hr><br><strong>{$infoo['Que_ID']}</strong><br />\n";
$_Session1=$infoo['Que_ID'];
$man=count($_Session1);
while($infooo = mysql_fetch_array( $man)) {
$answer1 = $infooo['Que_Answer1'] == $infooo['Ans_Answer1'];
$answer2 = $infooo['Que_Answer2'] == $infooo['Ans_Answer2'];
$answer3 = $infooo['Que_Answer3'] == $infooo['Ans_Answer3'];
$answer4 = $infooo['Que_Answer4'] == $infooo['Ans_Answer4'];
if ( $answer1 && $answer2 && $answer3 && $answer4)
{
echo ("1");
}
else
{
echo ("0");
}
}
}