Jump to content

php repeat region


adambedford

Recommended Posts

Hi,

 

I am using PHP and MySql to create a dynamic website and need a bit of help.

 

The website is: www.etseuro.com/index.php and on the home page, there are 2 sections. Each section gets its title and content from a database, and I will make it so that the image is also from the database. I have two questions: I know there are only 2 sections now, but in the future if I were to add a third and didnt have an image for that section, how could i get it to display well without the image? I am using tables at the moment, with a column for the image, but is there a way of saying if there is an image, use this table (ie. 2 columns) and if there isnt an image, only have one column?

 

The other question is could I get every 2nd section to be flipped vertically, i.e. have the title aligned to the right and the image also on the right. This is the site as I would like it, but this isnt dynamic at all, just html: www.etseuro.com/index.html

 

Thanks in advance

 

Adam

Link to comment
https://forums.phpfreaks.com/topic/148103-php-repeat-region/
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.