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; } //function to fetch top 2 featured projects for sidebar function fetch_featured_projects_sidebar($conn) { $sql = "SELECT * FROM featured_projects LIMIT 2"; $result = $conn -> query($sql); return $result; } ?> My Projects - @neo_subhamoy

My Projects 🎉

Work, Hobby & Open Source

I'm just obsessed with side projects and open-source stuffs

You can explore some of them below

heroimage

Projects by Timeline

HTML; //apply different styling for first iteration if($selectedYear === reset($years)) { echo << HTML; } else { echo << HTML; } echo <<$selectedYear
HTML; //apply different styling for last iteration if ($selectedYear === end($years)) { echo <<
HTML; } else { echo <<
HTML; } echo << HTML; //fetch all projects by year and show it while ($project = $projects -> fetch_assoc()) { echo " ".$project['name']." "; } echo <<
HTML; } } ?>
My Profiles
neosubhamoy
Subhamoy Biswas

Personal Profile

techishfellow
The TechishFellow

Digital Product Publisher

Featured Projects
num_rows > 0){ while($featured_item = $featured_projects -> fetch_assoc()) { echo "
".strtolower($featured_item[
"; } } ?>
Currently Working On
React Web Development
Android OS & Apps
Automation & Python
Javascript Library
AI & ML