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

PHP - if value is null or empty, do this

0 votes
12 views
added Aug 19 in PHP by lcjr Second Warrant Officer (6,120 points)
<?php
  if($nid == 1860554) {
    echo '<h4><span style=""><img src="media/logo.png"></span></h4>';
  }
  else { 
    if (empty($field_slogan)) {
      echo "";
    }
    else {
      echo "<h4>" . $field_slogan . "</h4>"; 
    } 
  }
?> 

 

Please log in or register to response this reference.

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