mardi 21 avril 2020

just need the explanation

In the following code , without '== 0' the result shows wrong answer (A is an odd number). and with '== 0 ' the reult shows the correct answer. Need to know the explanation .

    <?php
$A = 78;

if ($A % 2 == 0) {
    echo "A is a even number";
} else {
    echo "A is an odd number";
}
;

Aucun commentaire:

Enregistrer un commentaire