no non va
ho provato cosi
Codice PHP:
for ($l=1;$l<=4;$l++){
                    if (
$l==$esatta){
                    
$tipo[$l]="<span style='color:green;font-weight:bold'>$tipo[$l]</span>";
                    }
                    }
                    do{
                    
$r++;
                    if(
$risposte[$r]=1){
                    
$result="<span style='color:red;font-weight:bold'>$tipo[1]</span>
$tipo[2]
$tipo[3]
$tipo[4]
"
;
                    }
                    elseif(
$risposte[$r]=2){
                    
$result="$tipo[1]
<span style='color:red;font-weight:bold'>
$tipo[2]</span>
$tipo[3]
$tipo[4]
"
;
                    }
                    elseif(
$risposte[$r]=3){
                    
$result="$tipo[1]
$tipo[2]
<span style='color:red;font-weight:bold'>
$tipo[3]</span>
$tipo[4]
"
;
                    }
                    elseif(
$risposte[$r]=4){
                    
$result="$tipo[1]
$tipo[2]
$tipo[3]
<span style='color:red;font-weight:bold'>
$tipo[4]</span>";
                    }

                    }
                    while(
$r==11); 
                    
                    do{
                    
$t++;
                    if(
$esatta==$risposte[$t]){
                    
$esito[$t]= "[b]Domanda $t$domanda[/b]
$result

Esito: <span style='color:green'>esatta</span>
Risposta esatta: <span style='color:blue'>
$esatta</span>

[b]Spiegazione:[/b]
$descrizione

"
;
                    
$v++;                
                    }
                    else{
                    
$esito[$t]= "[b]Domanda $t$domanda[/b]
$result

Esito: <span style='color:red'>errata</span>
Hai risposto: <span style='color:blue'>
$risposte[$t]</span>
Risposta esatta: <span style='color:blue'>
$esatta</span>

[b]Spiegazione:[/b]
$descrizione

"
;
                    }
                    }
                    while(
$t==11); 
però ora mi dice che la mia risposta è sempre la 1. in pratica il ragionamento è quello di impostare le risposte a monte e rilasciarle impostate a valle con $result