Jump to content

Archived

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

cturner

Displaying data from a database?

Recommended Posts

Can someone please tell me how I can display the data that has information in it from a database? Only the rows and columns that have data in it. For instance if I have bullets in a database table I only want to display the bullets that have information not having bullets continuing down a page. Thanks in advance.

Share this post


Link to post
Share on other sites
you could use empty() to determine if there any data, then only echo the rows where there is data included

if(!empty($row['my_data']){
  echo $row['my_data'];
}
else{
  // do nothing
}

Share this post


Link to post
Share on other sites

×

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.