Projects Timeline by Year
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 "
";
}
echo <<