Answer the question
In order to leave comments, you need to log in
How to correctly work out two include on the page?
The page is not completely displayed with two active include's.
There are two inclusions.
One displays statistics on the book and the other video tutorials on it.
With deactivation (commented out) of one include, the second one works fine (and vice versa) displaying the entire index page entirely.
<?php
require 'db.php';
$query = "select * from unch_statistic;";
$statistics = db::getInstance()->get_result($query);
?>
<div class="container">
<div class="row">
<?php foreach ($statistics as $statistic): ?>
<div class="col-lg-3 col-md-6">
<div class="single-counter">
<h1 class="counter"><?=$statistic['counter'];?></h1>
<p><?=$statistic['name'];?></p>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question