query("SELECT * FROM rooster INNER JOIN docenten ON rooster.docent = docenten.id WHERE dag = DATE('" . $today . "');"); if ($result->num_rows === 1) { $rooster = [$result->fetch_assoc()]; } else { $rooster = $result; }