zwiebelspaetzle Posted August 19, 2008 Share Posted August 19, 2008 Hello, I'm trying to print out contact info without lots of blank lines. I've tried if ( !is_null( $row['PHONE'] ) ) echo $row['PHONE'] . "<br />"; if ( !is_null( $row['E_MAIL'] ) ) echo $row['E_MAIL'] . "<br />"; if ( !is_null( $row['WEBSITE'] ) ) echo $row['WEBSITE']; but it returns each line, regardless of whether the data field is null. I've also tried it with isset($row['x']), to no avail. If there a certain function or property to use with mysql data arrays? Thanks, --Chris Link to comment https://forums.phpfreaks.com/topic/120284-solved-how-to-determine-a-null/ Share on other sites More sharing options...
bluejay002 Posted August 19, 2008 Share Posted August 19, 2008 have you tried empty() instead? Link to comment https://forums.phpfreaks.com/topic/120284-solved-how-to-determine-a-null/#findComment-619886 Share on other sites More sharing options...
zwiebelspaetzle Posted August 19, 2008 Author Share Posted August 19, 2008 Thanks! empty() did the trick. Link to comment https://forums.phpfreaks.com/topic/120284-solved-how-to-determine-a-null/#findComment-620250 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.