$value){ $o = 'c'.$value[0]; if(@$_POST[$o] == $value[0] && array_search($value[0], $ten)){ $score ++; } } $score *= 10; echo "
Your score: ".$score."%

Your correct answers are highlighted in green.
The remaining correct answers are highlighted in blue.

"; } //foreach($commandments as $key => $value) //for($key=0; $key $value) { //$value=$commandments[$key]; $class = ""; if($pN==3) { if(array_search($value[0], $ten)) { $o = 'c'.$value[0]; if(@$_POST[$o] == $value[0]){ $class = 'style="color:#009900"'; } else { $class = 'style="color:#6488A8"'; } //$class = 'style="color:#6488A8"'; } } ?>
>