Jump to content

Please Help with Tables...


MaxStern

Recommended Posts

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

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.