Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

PHP - if, else, elseif condition

0 votes
413 views
added Mar 27, 2018 in PHP by LC Marshal Captain (25,700 points)
edited Jul 20, 2018 by LC Marshal
// If $bedrooms is not empty, show the .hidden-t-m elements

<?php if (!empty($bedrooms)): ?>
    <div class="hidden-t-m"><?php print $bedrooms ?> Beds</div> 
<?php endif; ?>

 

22 Responses

0 votes
responded Sep 24, 2019 by lcjr Sergeant (2,320 points)
<?php
  if($isPro){
      require_once('page--type-projects--pro.php');
  }elseif($isContest){
      require_once('page--type-projects--contest.php');
  }else{
    echo 'Node owner is neither pro nor contest.';exit;
  }

?>

 

0 votes
responded Mar 12 by LC Marshal Captain (25,700 points)
<?php if($epick == 0) {?>
    <span class="cat-meta">
      <a href="/news/search?field_category_value=<?php echo $filter['field_category_value'];?>&combine="><?php echo $search->field_category;?></a>
    </span>
<?php } ?>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...