Lo puedes dividir en funciones:
Código PHP:
function examen() {
if ($f_intentos == 0){
if($resumen=="Aprobo Examen Teorico")
(($f_codest="T") and ($f_intentos = "1"));
else if($resumen=="Reprobo Examen Teorico")
(($f_codest="E") and ($f_intentos="1"));
echo "Ramo 1";
}
}
//SIGUIENTE FUNCION
function intentos() {
if ($f_intentos == 1){
if($resumen=="Aprobo Examen Teorico")
(($f_codest="T") and ($f_intentos="2"));
else if($resumen=="Reprobo Examen Teorico")
(($f_codest="E") and ($f_intentos="2"));
echo "Ramo 2";
}
}
// Y solo llamas a la que quieras poniendo:
//examen(); o....
// intentos();
//OBVIAMENTE LE QUITAS LAS DOBLES BARRAS
SALUDOS