Creating a grid view of products in PHP

iuYtsl

New Member
very new to PHP to please bear with.As you can see from my snippet of code I am simply displaying product information one line under each other then repeating the loop using while. This then obviously displays my relevant data in just one column, one under each other.\[code\]while ($row = mysqli_fetch_row($result)){ echo "<img src=http://stackoverflow.com/"images/album1.jpg\"/><br>"; //this will eventually show the product image echo "<a href=http://stackoverflow.com/"product.php?id=$row[0]\">$row[1] </a><br>"; //this shows the product name echo "<strong>&pound$row[2]</strong><br>"; //this shows the product price }\[/code\]How would I go about creating a grid view, for example using columns to display my data? I presume it would be some kind of loop to be added and maybe using tables to display my data?Any help is greatly appreciated.
 
Back
Top