PHP - if its not empty

0 votes
236 views
added Mar 5, 2019 in PHP by LC Marshal Captain (25,790 points)
$field_prop_listing_type = '';
if (!empty($node['field_prop_listing_type']['und'])) {
  $field_prop_listing_type = $node['field_prop_listing_type']['und'][0]['value'];
}

 

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