Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

if statements

$
0
0

This is how I currently have it setup

 

<?php if ($high1name == "open") { ?>

<div class="module high open">
    <img src="Icon_hi_slot.png" width="46" height="46">
</div>

<?php } elseif ($high1name == "none") { ?>

    <div class="module high inactive">

    </div>

<?php } else { ?>

<div class="module high">
    <img src="http://image.website.com/Type/<?php print($high1typeID);?>_64.png">
    
</div>


<? } ?>
 

 

 

But I would like to have it something like this

 

 

<?php if ($high1name == "open") { ?>

<div class="module high open">
    <img src="Icon_hi_slot.png" width="46" height="46">
</div>

<?php } elseif ($high1name == "ANY VALUE HERE") { ?>

<div class="module high">
    <img src="http://image.website.com/Type/<?php print($high1typeID);?>_64.png">
    
    </div>

<?php } else { ?>

<div class="module high inactive">
    
</div>


<? } ?>
 

 

How do I get the elseif to work for any value $high1name has?


Viewing all articles
Browse latest Browse all 13200

Trending Articles