• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 516
  • Last Modified:

display content only if the column is NULL

I need to show content if the live column is NULL. I can do this the other way (as below) but can figure out how to display content only if the live column is NULL

Any ideas?


    <?php if(!empty($row_propertyInfo['live'])): ?>
    
    
content to show if NULL

<?php endif; ?>

Open in new window

0
BrighteyesDesign
Asked:
BrighteyesDesign
1 Solution
 
zappafan2k2Commented:
I would look at this the other way around.  If a property is live, then the value is 1, right?  So how about
<?php if ($row_propertyInfo['live'] != 1): ?>
content
<?php endif; ?>

Open in new window

0
 
Julian HansenCommented:
I must be missing somethign - why can't you do this
<?php
if(empty($row_propertyInfo['live'])): ?>
       
content to show if NULL

<?php endif; ?>

Open in new window

0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now