Page 1 of 1

IF Record Column is Empty

Posted: Fri Oct 01, 2004 5:58 pm
by AliasBDI
I am trying a basic IF clause for a specific column. I want it to not show if the column in the record is empty. I tried this but it does not work. Any ideas?

Code: Select all

<?php
if ($row_detailsDoctrine['notes']=="NOT NULL"){ ?>

Posted: Fri Oct 01, 2004 6:10 pm
by John Cartwright
its actually if $var != NULL

but instead you should just do if (!empty($var))

Posted: Fri Oct 01, 2004 7:26 pm
by Joe

Code: Select all

<?php
if (!empty($row_detailsDoctrine['notes'])){ ?>

Posted: Sun Oct 03, 2004 9:33 pm
by AliasBDI
Joe, that nailed it. Thanks a bunch!