<?php $sqlc = "SELECT * FROM banner_master  WHERE slider_type='banner' AND activestatus='1'  ORDER BY rowId ASC LIMIT 3";
   $myq=$conn->query($sqlc);
   $mydar= $myq->fetchAll()  ;
   
   $rows_fou = $myq->rowCount();
   ?>
<section class="gap-top mb-4">
   <div class="container">
      <div class="row">
         <div class="col-md-12 pt-4">
            <!-- Carousel -->
            <div id="demo" class="carousel slide" data-bs-ride="carousel">
               <!-- Indicators/dots -->
               <div class="carousel-indicators">
                  <button type="button" data-bs-target="#demo" data-bs-slide-to="0" class="active"></button>
                  <button type="button" data-bs-target="#demo" data-bs-slide-to="1"></button>
                  <button type="button" data-bs-target="#demo" data-bs-slide-to="2"></button>
               </div>
               <!-- The slideshow/carousel -->
               <div class="carousel-inner">
                  <?php  foreach( $mydar as $rowcon ) {
                     $banner_path = $rowcon['banner_path'];
                       $activestatus = $rowcon['activestatus'];
                        $banner = $rowcon['banner'];
                      $activestatus_ch='';
                       if($banner==1){
                         $activestatus_ch='active';
                       }
                     
                      ?>
                  <div class="carousel-item <?=$activestatus_ch?>">
                     <img src="<?=$banner_path?>"  alt="banner" title="banner" class="d-block rounded-3 img-fluid w-100">
                  </div>
                  <?php } ?>
               </div>
               <!-- Left and right controls/icons -->
               <button class="carousel-control-prev" type="button" data-bs-target="#demo" data-bs-slide="prev">
               <span class="carousel-box-left"><span class="carousel-control-prev-icon"></span></span>
               </button>
               <button class="carousel-control-next" type="button" data-bs-target="#demo" data-bs-slide="next">
               <span class="carousel-box-right"><span class="carousel-control-next-icon"></span></span>
               </button>
            </div>
         </div>
      </div>
   </div>
</section>