I’m creating dynamic tabs with dynamic content by using Bootstrap in PHP Mysql. what I want to do here is, display the order_date on the nav-tab and the content of each nav-tab will be displayed by the date of the customer made their orders. The date in each nav-tab can be shown properly according to the condition set, but the content of each nav-tab does not show according to the condition set. It just displays all of the data. Can I know how can I display the content according to the condition set? Let’s say I clicked on the ‘2021-09-09’ tab, the order that is only made on this date will be shown as the content of this nav_tab. Any form of help will be appreciated. thanks in advance! PHP: <div class="col-12"> <div class="card"> <div class="card-header"> <h4 class="card-title"> All Products</h4> <span> <a href="download-list/download-products.php" class="btn btn-info float-right mb-3"><i class="fa fa-download" aria-hidden="true"></i> Download Products List</a> </span> <span> <a href="download-list/download-products.php" class="btn btn-info float-right mb-3"><i class="fa fa-download" aria-hidden="true"></i> Download Products List</a> </span> </div> <div class="card-body"> <ul class="nav nav-tabs"> <li class="nav-item"> <ul class="nav nav-tabs"> <?php echo $tab_menu; ?> </ul> </li> </ul> </div> <div class="card-body"> <div class="table-responsive" style="max-height: 70vh"> <table class="table"> <thead class="text-primary"> <th style=" position: sticky;top: 0; background: white" ;> Order no </th> <th style=" position: sticky;top: 0; background: white" ;> Product Name </th> <th style=" position: sticky;top: 0; background: white" ;> Quantity </th> <th style=" position: sticky;top: 0; background: white" ;> Order Date </th> <th style=" position: sticky;top: 0; background: white" ;> Recieve by </th> <tr> <?php echo $tab_content; ?> </tr> </tbody> </table> </div> </div>
Can you share the content of the variable $tab_content because it looks like if the tab content is not right means that variable doesn't have the format that the HTML requires for each of the tab content.