Currently, I am having a code for pagination and it is displaying all pages continuously
<div class="col-md-12">
<nav aria-label="Page navigation">
<ul class="pagination">
<?php for ($i=0 ; $i < $products->totalPages; $i++) : ?>
<li <?php if ($products->number == $i) echo "class='active'"; ?>>
<a <?php if ($products->number != $i): ?> href="index.php?page=<?php echo $i . (isset($_GET['cid']) ? '&cid=' . $_GET['cid'] : ''); ?>#prdct" <?php endif; ?>><?php echo($i + 1); ?></a>
</li>
<?php endfor; ?>
</ul>
</nav>
</div>
Adding a screenshot showing how it will be now displaying:
What to do to make this comes in a single row?