hip1/14.5.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <?php setlocale (LC_ALL, 'nld_NLD'); include('db.php'); $query = "select * from leerlingen"; $result = mysqli_query($db, $query) or die(mysqli_error($db)); while($row = mysqli_fetch_array($result)){ echo "<h2>$row[voornaam] </h2>"; echo "<div>".strftime("%d %B %Y", strtotime($row['geb_datum']))."</div>"; echo "<div>".round((time()-strtotime($row['geb_datum']))/31557600, 1)."</div>"; } ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse