mardi 21 juin 2016

Multiple If Statements using variable

I have managed to get a if statement working, however i would like to ask how to make it do IF there are two rules to my IF statement ?

My current If statement before i messed with it

<?php if (is_null($ContentPicture1Title)){ ?>
   <div class="letter-badge"><img src="image1.jpg"></div>
<?php } else { ?>
   <div class="letter-badge"><img src="image2.jpg"></div>
<?php }?>

My If statement trying to get two rules applied

<?php if (is_null($ContentPicture1Title) && ($ContentPicture1URL)){ ?>
   <div class="letter-badge"><img src="image1.jpg"></div>
<?php } else { ?>
   <div class="letter-badge"><img src="image2.jpg"></div>
<?php }?>

Thank you

Aucun commentaire:

Enregistrer un commentaire