dimanche 27 septembre 2015

When using IF statement with OR it returns yes no matter what is foo

I have:

<? if ($foo != 11 || 10) {echo 'Some html code there';} ?>

When I run it, if statement returns yes no matter what value is foo. When I delete " || 10" its working well. Where could be problem?

Aucun commentaire:

Enregistrer un commentaire