Jump to content

Not Null question


realjumper

Recommended Posts

Hi,

 

How can I write my if statement to show the result if the varialble ( reading from the DB) is not empty or is not equal to NULL? I have been playing with the syntax but I can't get it right. Thanks for any help

 

if ($row[sect1] != '' || $row[sect1] IS NOT 'NULL')
  {
   echo "Hello";
  }

Link to comment
https://forums.phpfreaks.com/topic/97853-not-null-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.