<?php
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="courses_template.csv"');

$output = fopen('php://output', 'w');
fputcsv($output, ['Course Name', 'Semester','Year', 'Program']);
fputcsv($output, ['Mathematics', '1', '1','Computer Science']);
fputcsv($output, ['Physics', '1','3','Engineering']);
fclose($output);
exit();
?>