title: php loop repetitive execution
body: <p>what can i change in this code to make the output from <a href="https://snag.gy/Be0xzU.jpg" rel="nofollow noreferrer">This</a> to make it look like <a href="https://snag.gy/vmnrya.jpg" rel="nofollow noreferrer">This</a></p>
  
  <p><strong>The two 'This' links are screenshots of the layouts</strong>
  I want all the boxes to be in-line / next to each other just like the second screenshot.</p>
  
  <p>i programmed the layout in html and it worked when trying php the layout just messed up.</p>
  
  <pre><code>function getTest(){
  
    global $con;
  
    $get_pro = "select * from drinks";
  
      $run_pro = mysqli_query($con, $get_pro); 
  
      while($row=mysqli_fetch_array($run_pro)){
  
      $id = $row['id'];
      $title = $row['title'];
        $cat = $row['cat'];
        $image = $row['image'];
        $desc = $row['desc'];
        $qty = $row['qty'];
        $price =$row['price'];
        $status= $row['status'];
  
  
  echo "&lt;!--==========================\n"; 
  echo "  Price Menu\n"; 
  echo "============================--&gt;\n"; 
  echo "      &lt;!-- Page Content --&gt;\n"; 
  echo "      &lt;main class=\"entry-content\"&gt;\n"; 
  echo "          &lt;section class=\"page-section\"&gt;\n"; 
  echo "              &lt;div class=\"container\"&gt;\n"; 
  echo "              \n"; 
  echo "                  &lt;div class=\"row\"&gt;\n"; 
  echo "                      &lt;div class=\"col-md-12\"&gt;\n"; 
  echo "                          &lt;div class=\"isotope-filters\" role=\"group\"&gt;\n"; 
  echo "                              &lt;div class=\"btn-group\"&gt;\n"; 
  
  // the categories go here
  
  echo "                              &lt;/div&gt;\n"; 
  echo "                          &lt;/div&gt;\n"; 
  echo "                      &lt;/div&gt;\n"; 
  echo "                  &lt;/div&gt;\n"; 
  echo "                  &lt;br&gt;&lt;br&gt;\n"; 
  echo "                  &lt;div class=\"row isotope-wrapper isotope-beers-wrapper\"&gt;\n"; 
  echo "                      &lt;div class=\"isotope isotope-beers gutter\"&gt;\n"; 
  echo "                          &lt;div class=\"grid-item col-lg-3 col-md-3 col-sm-6 col-ms-6 col-xs-12 $cat\"&gt;\n"; 
  echo "                              &lt;div class=\"grid-wrapper\"&gt;\n"; 
  echo "                                  &lt;a href=\"javascript:void(0);\" data-remodal-target=\"bottle-$id\"&gt;\n"; 
  echo "                                      &lt;figure style=\"background-image: url('admin/images/drinks/$image')\"&gt;\n"; 
  if ($row['status'] === 'Yes'){
  echo "                                      &lt;div class=\"offer\"&gt;&lt;/div&gt;\n"; 
  }
  echo "                                          &lt;figcaption class=\"grid-content\"&gt;\n"; 
  echo "                                              &lt;h5 class=\"grid-title\"&gt;&lt;span&gt;$title&lt;/span&gt;&lt;/h5&gt;\n"; 
  echo "                                          &lt;/figcaption&gt;\n"; 
  echo "                                      &lt;/figure&gt;\n"; 
  echo "                                  &lt;/a&gt;\n"; 
  echo "                              &lt;/div&gt;\n"; 
  echo "                          &lt;/div&gt;\n"; 
  echo "                      &lt;/div&gt;\n"; 
  echo "                  &lt;/div&gt;\n"; 
  echo "\n"; 
  echo "              &lt;/div&gt;\n"; 
  echo "          &lt;/section&gt;\n"; 
  echo "      &lt;/main&gt;&lt;!-- /.enry-content --&gt;\n"; 
  echo "\n"; 
  echo "      &lt;!-- Off-Page Content --&gt;\n"; 
  echo "      &lt;!-- Mobile Navigation (Left Panel) --&gt;\n"; 
  echo "      &lt;!-- Preloader --&gt;\n"; 
  echo "      &lt;div class=\"introLoading\"&gt;&lt;/div&gt;\n"; 
  echo "      &lt;!-- Back to Top --&gt;\n"; 
  echo "      &lt;div&gt;\n"; 
  echo "          &lt;a class=\"back-to-top fa fa-chevron-up\" href=\"javacript:void(0);\"&gt;&lt;/a&gt;\n"; 
  echo "      &lt;/div&gt;\n"; 
  echo "      &lt;!-- Modal Content --&gt;\n"; 
  echo "      &lt;div class=\"remodal-bg\"&gt;\n"; 
  echo "          &lt;!-- Item One --&gt;\n"; 
  echo "          &lt;div class=\"remodal modal-beers\" data-remodal-id=\"bottle-$id\"&gt;\n"; 
  echo "              &lt;button data-remodal-action=\"close\" class=\"remodal-close\"&gt;&lt;/button&gt;\n"; 
  echo "              &lt;div class=\"row\"&gt;\n"; 
  echo "                  &lt;div class=\"col-md-5 col-sm-12 col-xs-12\"&gt;\n"; 
  echo "                      &lt;div class=\"item-modal-image\"&gt;\n"; 
  echo "                          &lt;a class=\"image-lightbox\" href=\"admin/images/drinks/$image\"&gt;&lt;img alt=\"\" src=\"admin/images/drinks/$image\" /&gt;&lt;/a&gt;\n"; 
  echo "                      &lt;/div&gt;\n"; 
  echo "                  &lt;/div&gt;\n"; 
  echo "                  &lt;div class=\"col-md-7 col-sm-12 col-xs-12\"&gt;\n"; 
  echo "                      &lt;h3&gt;$title&lt;/h3&gt;\n"; 
  echo "                      &lt;p&gt;$desc&lt;/p&gt;\n"; 
  echo "                      &lt;table class=\"table\"&gt;\n"; 
  echo "                          &lt;tbody&gt;\n"; 
  echo "                              &lt;tr&gt;\n"; 
  echo "                                  &lt;td&gt;Price:&lt;/td&gt;\n"; 
  echo "                                  &lt;td&gt;£$price&lt;/td&gt;\n"; 
  echo "                              &lt;/tr&gt;\n"; 
  echo "                              &lt;tr&gt;\n"; 
  echo "                                  &lt;td&gt;Quantity:&lt;/td&gt;\n"; 
  echo "                                  &lt;td&gt;$qty&lt;/td&gt;\n"; 
  echo "                              &lt;/tr&gt;\n"; 
  echo "                          &lt;/tbody&gt;\n"; 
  echo "                      &lt;/table&gt;\n"; 
  echo "                  &lt;/div&gt;\n"; 
  echo "              &lt;/div&gt;\n"; 
  echo "          &lt;/div&gt;\n"; 
  echo "      &lt;/div&gt;  \n"; 
  echo "\n"; 
  echo "    &lt;!--==========================\n"; 
  echo "  Price Menu end\n"; 
  echo "============================--&gt;\n";
  
  }
  
  }
  </code></pre>