Newsletter Archives

Welcome : Here’s our Newsletter archives. A monthly published paper of events and activities carried on by the chapter.

[insert_php]

$lastYear = ”;
$newsletters = glob(“Newsletters/*.pdf”);

foreach ($newsletters as $pdf) {
$dateTime = date(“F Y”, filemtime($pdf));
$name = basename($pdf, “.pdf”);
list($eaa, $month, $year) = explode(“-“, $name);
$array[] = array(1 => $year, 2 => $month, 3 => $pdf);
}
rsort($array);
$monthName = array(1 => ‘January’,
‘February’,
‘March’,
‘April’,
‘May’,
‘June’,
‘July’,
‘August’,
‘September’,
‘October’,
‘November’,
‘December’);
echo ”

“;
foreach ($array as $data) {
$month = (int)$data[2];
$year = (int)$data[1];
$file = $data[3];
if ($year != $lastYear) {
echo ”

“;
}
echo ”

“;
$lastYear = $year;
}
echo “

$year
$monthName[$month] $year

“;

[/insert_php]