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 Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted August 19, 2008 Share Posted August 19, 2008 have you tried empty() instead? Quote Link to comment Share on other sites More sharing options...
zwiebelspaetzle Posted August 19, 2008 Author Share Posted August 19, 2008 Thanks! empty() did the trick. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.