Jump to content

Suppressing a blank field


Recommended Posts

HiI have some code that displays event listings.If any of the fields like $row['event_artist'] or $row['event_detail'] or $row['event_contact'] are blank or NUll I get a blank line (because of the <br />). Is there a way I can easily get around that without having to put in IF/ELSE statements to check if the fields is blank and then using different code?echo $row['event_name'] . "<br> " . $row['event_start_time'] . $row['event_venue'] . "<br />" . $row['event_artist'] . "<br />" . $row['event_detail'] . "<br />" . $row['event_contact'] . "<br><br>"; Many thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...