bbbdj916
12/8/2017 - 3:02 AM

If else condition with

If else condition with

<?php if($condition) : ?>
    <a href="http://google.com">This will only display if $condition is true</a>
<?php endif; ?>
<!--or with else conditions -->

<?php if($condition) : ?>
    <a href="http://google.com">This will only display if $condition is true</a>
<?php elseif($anotherCondition) : ?>
    <p>more html</p>
<?php else : ?>
    <p>even more html</p>
<?php endif; ?>