<div class="ps-most-populler " role="tablist">
  <ul class="nav nav-pills side-tab-main " id="pills-tab" role="tablist">
    <li class="nav-item active" id="popNews" data-bs-toggle="tab" data-bs-target="#popNews-tab-pane" type="button" role="tab" aria-controls="popNews-tab-pane" aria-selected="false" tabindex="-1">
      <a class="nav-link" aria-selected="false" tabindex="-1" role="tab"> জনপ্রিয়</a>
    </li>
    <li class="nav-item " id="endNews" data-bs-toggle="tab" data-bs-target="#endNews-tab-pane" type="button" role="tab" aria-controls="endNews-tab-pane" aria-selected="true">
      <a class="nav-link" aria-selected="false" tabindex="-1" role="tab"> সর্বশেষ</a>
    </li>

  </ul>
  <div class="tt-white tab-content" id="myTabContent">
    <!--========== ENDNEWS TAB START ==========-->
    <div class="tab-pane new-fade  show" id="endNews-tab-pane" role="tabpanel" aria-labelledby="endNews" tabindex="0">
      <?php
      $popular_article = getPopularArticles(10);
      foreach ($popular_article as $the_populer) {
        ?>
        <a href="<?php echo articleLink($the_populer['PostId']) ?>" class="d-block border-bottom tt-white prothom-songbad-post-style p-2">
          <div class="row g-2 align-items-center">
              <div class="col-5">
                <div class="position-relative overflow-hidden">
                  <img class="w-100 ps-post-line-img" src="<?php echo $advancenews['ArticlePreloader'] ?>"  data-src="<?php echo articleImg($the_populer['PostId']) ?>" alt="<?php echo $the_populer['PostTitle'] ?>">
                </div>
              </div>
              <div class="col-7">
                <h1 class="news-title-4 m-0 tt-text"><?php echo $the_populer['PostTitle'] ?></h1>
              </div>
          </div>
        </a>
        <?php
      }
       ?>
    </div>
    <!--========== ENDNEWS TAB END ==========-->
    <div class="tab-pane new-fade active" id="popNews-tab-pane" role="tabpanel" aria-labelledby="popNews" tabindex="0">
      <?php
      $recent_article = getRecentArticles(10);
      foreach ($recent_article as $the_recent) {
        ?>
        <a href="<?php echo articleLink($the_recent['PostId']) ?>" class="d-block border-bottom tt-white prothom-songbad-post-style p-2">
          <div class="row g-2 align-items-center">
              <div class="col-5">
                <div class="position-relative overflow-hidden">
                  <img class="w-100 ps-post-line-img" src="<?php echo $advancenews['ArticlePreloader'] ?>"  data-src="<?php echo articleImg($the_recent['PostId']) ?>" alt="<?php echo $the_recent['PostTitle'] ?>">
                </div>
              </div>
              <div class="col-7">
                <h1 class="news-title-4 m-0 tt-text"><?php echo $the_recent['PostTitle'] ?></h1>
              </div>
          </div>
        </a>
        <?php
      }
       ?>
    </div>
  </div>
</div>
