PHP - Conditional:: show URL if value !empty

0 votes
205 views
added Sep 24, 2019 in PHP by lcjr First Warrant Officer (11,930 points)
<?php if(!empty($profile->field_company_name->value())): ?>  
 <div class="_row">
  <div>
    <i class="fa fa-certificate" aria-hidden="true"></i>
    <a href="/professional/<?php echo $profile->field_company_name_slug->value() ?>"><?php print $profile->field_company_name->value(); ?></a>
  </div>
 </div>
<?php endif;?>

 

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