adambedford Posted March 5, 2009 Share Posted March 5, 2009 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 More sharing options...
waynew Posted March 5, 2009 Share Posted March 5, 2009 if(is_file($row['image'])){ //display } else{ //dont display } Link to comment https://forums.phpfreaks.com/topic/148103-php-repeat-region/#findComment-777431 Share on other sites More sharing options...
adambedford Posted March 5, 2009 Author Share Posted March 5, 2009 thanks, how can i get the repeated rows to alternate allignment? Link to comment https://forums.phpfreaks.com/topic/148103-php-repeat-region/#findComment-777560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.