Colleagues. I do not know if it was clear in my title, but I'll try to explain it here. I have the following code:
foreach($notasAlunos as $notaAluno){
$resXML = $xml->avaliacao->disciplina->questao->resposta;
if($resXML == $notaAluno){
$valor = 1;
echo count($valor);
}else{
$valor = 0;
}
//echo $valor;
}
I need to add the amount of "1" that the variable $ value brings us. I tried to use the count ($ value), but it's bringing "111". How would I add these values and return 3?