I have the following col-md-3 col-sm-6 which I'm repeating for every input in my DB table, but I need them to be surrounded by row elements for every four col-md-3or every two col-sm-6.
<?php . . . while($query_row = mysqli_fetch_assoc($query_run)){ $ref_name = $query_row ['ref_name']; $ref_company = $query_row ['ref_company']; $ref_img = $query_row ['ref_img']; $ref_modal = $query_row ['ref_modal']; ?> <div class="col-md-3 col-sm-6 outerref"> <a href="#" data-toggle="modal" data-target="<?php echo "$ref_modal"?>"> <div class="innerref"> <img src="<?php echo $ref_img?>" alt="" class="maxim img-responsive" > <h2><?php echo "$ref_name"?></h2> <h4><?php echo "$ref_company"?></h4> </div> </a> </div> <?php } . . . ?> I have no idea how to end the row and open a new one when four col-md-3s or two col-sm-6s are outputted. Any help i appreciated.
Thanks in advance.