query($sql); if ($result) { // create a array of all unique years $years = array(); while ($row = $result -> fetch_assoc()) { $years[] = $row['year']; } $result -> free(); } //function to fetch all projects of the given year function fetch_projects_by_year($conn, $year) { $sql = "SELECT * FROM projects WHERE year = $year ORDER BY id DESC"; $result = $conn -> query($sql); return $result; } ?>
My Projects 🎉

Personal Profile

Digital Product Publisher