Jump to content

Displaying data


dbx

Recommended Posts

Hi,

 

I hope this is in the right section. I'm not sure if this is more css or php. I'd accept a solution in css or php...

 

I'm taking about 20 items from a database:

First name, surname, age, DOB etc

 

Some of these items will have values stored and some will not.

 

When my script takes them from the database, I am displaying them in 4 columns across the page (5 per column)

 

At the moment, each column only displays certain values. E.g. first column contains name, surname, age, dob, location

 

If the age is missing, nothing is printed and only 4 items will be displayed in that column. If the surname, age, dob and location are missing, only the first name would be displayed, resulting in only 1 item in that whole column.

 

How can i change things so that if something is missing, something from one of the other items will fall into its place? I would rather have 3 complete columns from left to right and nothing in the fourth than 2 items in the first, 5 items in the second, 4 items in the third and 4 in the fourth.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/135118-displaying-data/
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.