Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
dvprog_02 [2020-08-28 12:46]
Daniel Viström
dvprog_02 [2020-09-03 13:07]
Daniel Viström
Line 88: Line 88:
 if (!($tal1 == 6)){                // Blir samma som: if ($tal1 != 6){ if (!($tal1 == 6)){                // Blir samma som: if ($tal1 != 6){
   echo 'Talet är inte 6<br>';    echo 'Talet är inte 6<br>'; 
 +}
 +
 +if ($tal1 == 100) {
 +    echo '100<br>';
 +} else {                         // else = "annars". Utförs om villkoret i if-satsen inte är sant.
 +    echo 'Inte 100<br>';
 } }