title: Creating a grid view of products in PHP
body: <p>very new to PHP to please bear with.</p>
  
  <p>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.</p>
  
  <pre><code>while ($row = mysqli_fetch_row($result)){
  
      echo "&lt;img src=\"images/album1.jpg\"/&gt;&lt;br&gt;"; //this will eventually show the product image
      echo "&lt;a href=\"product.php?id=$row[0]\"&gt;$row[1] &lt;/a&gt;&lt;br&gt;"; //this shows the product name
      echo "&lt;strong&gt;&amp;pound$row[2]&lt;/strong&gt;&lt;br&gt;"; //this shows the product price
  
              }
  </code></pre>
  
  <p>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?</p>
  
  <p>Any help is greatly appreciated.</p>