MaxStern Posted May 4, 2013 Share Posted May 4, 2013 Hi, here is some code for my site, where images are displayed with text underneath. It is set up in a table, but all the images and text go horizontally, and I need it to go vertically. Please help. <center> <table border="1" rules="cols" width="100%"> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top"><img src="http://mywebsite.com/images/<?=$image->filename?>" width="100%"/></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Score: <?=$image->score?></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Performance: <?=$image->performance?></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Won: <?=$image->wins?></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Lost: <?=$image->losses?></td> <? endforeach ?> </tr> </table> </center> Link to comment https://forums.phpfreaks.com/topic/277631-please-help-with-tables/ Share on other sites More sharing options...
requinix Posted May 4, 2013 Share Posted May 4, 2013 PHPFreaks.com Questions, Comments, & Suggestions This is NOT a help forum! Do not post topics asking for help not related to the website. Vertically, as in the images go vertically and the text goes horizontally? Link to comment https://forums.phpfreaks.com/topic/277631-please-help-with-tables/#findComment-1428246 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.