Hi The below code is supposed to display tables side by side so to per row, It’s kind of working until it gets to the last entry. In my sample query The divs are
1. left2. right
3.left4. left
nuber 4 should be right.
Any ideas why its not working
[code]
$i = 0
$col = ($i % 2) ? ‘right’ : ‘left’;
echo “<div class=”$col”>”;?>
<table class=”table” style=”width:99%;”>
<tr>
<td rowspan=”3″ style=”width:20%;” valign=”top”>
<a href=”albumPhotos.php?photos=<?php echo $album[‘album’];?>&bid=<?php echo $buddy_id; ?>”><img src=”../user_images/<?php echo $album[‘album_cover’]; ?>” width=”<?php echo $newwidth; ?>” height=”<?php echo $newheight; ?>” alt=”<?php echo $album[‘album_cover’]; ?>” /></a>
</td>
<td style=”width:30%;” class=”eventSub”>Album:</td>
<td valign=”top”><?php echo $album[‘album’]; ?></td>
</tr>
<tr>
<td style=”width:25%;” class=”eventSub”>Owner:</td>
<td><a title=”Go to members profile” class=”linkText” href=”../profile.php?=id=<?php echo $album[‘user_id’]; ?>”><?php echo $buddy_info[‘first_name’].’ ‘.$buddy_info[‘last_name’];?></a></td>
</tr>
<tr>
<td style=”width:25%;” class=”eventSub”>Created:</td>
<td><?php echo $album[‘createdate’]; ?></td>
</tr>
</table>
<? echo “</div>”;
$i++;
} ?>
<?php }
}?>