```
   <div id="slider-edge">
        <div class="left-side-shadow"></div><!-- End .left-side-shadow -->
        <div class="right-side-shadow"></div><!-- End .left-side-shadow -->
        <div id="bxslider" class="container">
            <ul class="bxslider">
                <li>
                   <?php
                    $i =1;
                    $spro = $obj->limitallpro(4);
                    foreach($spro as $sspro){

                    ?>
                    <div class="slider-item">
                      <img src="images/products/big-phone1.jpg" alt="Slider item 3" width="400" height="400">
                        <div class="slider-item-details">
                            <div class="slider-item-wrapper">
                                <h3 class="item-name">
                                    <a href="product.html"><?php echo($sspro['pname']);?></a>
                                </h3>
                                <div class="item-price-container">
                                    <span class="item-price"><?php echo("".$sspro['pprice']." ");?>RS</span>
                                </div><!-- End .item-price-container -->
                                <p><?php echo($sspro['pdetails']);?></p>

                            <a href="cart.php/pid=<?php echo($sspro['pid']);?>" class="item-add-btn">
                                Add to Cart
                            </a>
                            </div><!-- End .slider-item-wrapper -->

                        </div><!-- End .slider-item-details -->
                    </div><!-- End .slider-item -->
                   <?php

                    ?>  

                      <?php
                    if($i%2 == 0){
                    ?>  
                     </li><li>

                    <?php
                    }
                        $i++;
                    }?>

            </ul>
        </div><!-- End #bxslider -->
        </div><!-- #slider-edge -->

```

I have slider which work as two div per li since i am trying to get conttent from server side what can i do then after every 2 rows of data from server it creates another li and then repeat 2 rows and close it and let it work as long as rows be keep added through server side. i used if case with modulus but that is not working