public function createRows() { while ($this->rows = mysqli_fetch_assoc($this->query)) { echo "<tr>\n <td>" . $this->rows['offers_id'] . "</td>\n <td>" . $this->rows['firstname'] . " " . $this->rows['lastname'] . "</td>\n <td>" . $this->rows['company'] . "</td>\n <td>€" . $this->rows['offers_subtotal_price'] . "</td>\n <td>" . $this->rows['offers_description'] . "</td>\n <td>" . $this->rows['offers_date'] . "</td>\n <td><a href='offerte_bewerken?id=" . $this->rows['offers_id'] . "'>Bewerken</a></td>\n <td><a href='incl/offers/templates/template_one.php?offer_id=" . $this->rows['offers_id'] . "&customer_id=" . $this->rows['customers_id'] . "' target='_blank'>Link</a></td>\n </tr>\n "; } } } $offers = new Offers(); ?> <div class="container"> <table id="table-offertes" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%"> <thead> <tr> <th>Offertenummer</th> <th>Klantnaam</th> <th>Bedrijf</th> <th>Bedrag</th> <th>Beschrijving</th> <th>Datum</th> <th>Bewerken</th> <th>Link</th> </tr> </thead> <tbody> <?php $offers->createRows(); ?> </tbody> </table> </div>