Table Problems
Posted: Tue Sep 18, 2007 1:36 am
I am using the following code to display the images from the database.
Currently it just displays the image,title and date in one row and then the other images in next row
However i want to create two columns and display all the images in following fashion
r1c1 image1 then r1c2 image2 then r2c1 image3 then r2c2 image4 and so on...
what to do ?
Currently it just displays the image,title and date in one row and then the other images in next row
However i want to create two columns and display all the images in following fashion
r1c1 image1 then r1c2 image2 then r2c1 image3 then r2c2 image4 and so on...
what to do ?
Code: Select all
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
while($row = mysql_fetch_array($sql))
{
$name= $row['name'];
$tcheck=$safeurl->make_safe_url($row['title']);
echo "<tr><td width='25%'>";
echo ' <img src="/addons/class.upload/test/'.$name.'" />';
echo '<br />';
echo '<a href="/'.$sid.'/'.$catid.'/'.$row['id'].'/0/'.$tcheck.'"><strong>' .$row['title'].'</strong></a>';
echo '<br />';
echo " [ ";
echo date("d/m/Y", $row['date'])."";
echo " ] </td></tr>";
}
echo "</table>";