table display using while
Posted: Mon Nov 22, 2010 8:04 am
I want to draw information from my db and display it - not an issue!
What I want to do is, when the columns in the table (the <td>'s) reaches 5 to start a new row.
I can't quite figure it out as I'm using a while loop to display the data currently.
I get the images showing up from the DB but it is just too long on the page.
Any Ideas?
Aravona
What I want to do is, when the columns in the table (the <td>'s) reaches 5 to start a new row.
I can't quite figure it out as I'm using a while loop to display the data currently.
Code: Select all
<?php $query = "select image from wp_wpsc_variation_values where id = '" .wpsc_the_variation_id(). "'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "<td><img src='http://www.site.co.uk/wordpress/wp-content/plugins/wp-e-commerce/themes/lsotheme/variationimgs/$row[image]' /></td>";
}
?>Any Ideas?
Aravona