title: How to insert multiple products slider in php
body: <p><strong>The following section creates a product slider from the first 6 database elements. How can I insert the next database elements(from row 6 to row 12) in a new product slider?</strong></p>
  <pre><code>&lt;section class=&quot;food&quot; id=&quot;food&quot;&gt;
      &lt;div class=&quot;swiper product-slider&quot;&gt;
          &lt;div class=&quot;swiper-wrapper&quot;&gt;
              &lt;?php
                  $sql = &quot;SELECT* FROM products&quot;;
                  $res = mysqli_query($conn, $sql);
                  $counter = 0;
                  if(mysqli_num_rows($res) &gt; 0){
                      while($row = mysqli_fetch_assoc($res)){
                          ++$counter;
                          if($counter &lt;= 6){
                              $id = $row['productId'];
                              $image = $row['productImg'];
                              $name = $row['productName'];
                              $price = $row['productPrice'];
                              $quantity = $row['productQuantity'];?&gt;   
                              &lt;form action=&quot;food.php&quot; method=&quot;post&quot; class=&quot;swiper-slide box&quot;&gt;
                                  &lt;img src=&quot;&lt;?php echo $image?&gt;&quot; alt=&quot;&quot;&gt;
                                  &lt;h3&gt;&lt;?php echo $name?&gt;&lt;/h3&gt;
                                  &lt;div class=&quot;price&quot;&gt; $ &lt;?php echo $price?&gt;&lt;/div&gt;
                                  &lt;div class=&quot;stars&quot;&gt;
                                      &lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;
                                      &lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;
                                      &lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;
                                      &lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;
                                      &lt;i class=&quot;fas fa-star-half-alt&quot;&gt;&lt;/i&gt;
                                  &lt;/div&gt;
                                  &lt;a href=&quot;#&quot; class=&quot;btn&quot;&gt;add to cart&lt;/a&gt;
                              &lt;/form&gt;&lt;?php
                          }
                      }
                  }
              ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>