lundi 10 juillet 2017

Else statement not executing in php

My code always executes if statement, even if the condition is false, it doesnt go to else.

<?php 
$link = $count;

if($link == 8 || 10) {

  echo "<a href='files/".$link.".pdf'>Link</a>";}
else{
  echo "Contact HES sales representative for detailed layout model";
}

  ?>

Aucun commentaire:

Enregistrer un commentaire