<?php
$subject="Health";
$path="/home/u494879289/public_html/images/modules/grade8/".$subject."/PDF";
$dlfpath="/images/modules/grade8/".$subject."/PDF/";
$files=scandir($path);

$index = array_search('index.html',$files);
if($index !== FALSE){
unset($files[$index]);
}
unset($files[0]);unset($files[1]);
foreach($files as $f){
echo "<table width=\"750\">";
echo "<tbody>";
echo "<tr>";
echo "<td>";
echo "<strong>";
echo strtoupper(mb_strimwidth($f, 0, 80, "..."));
echo "</strong>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<a href=\"".$dlfpath."/".$f."\" download=\"".$f."\">";
echo "<button>";
echo "Download";
echo "</button>";
echo "</a>";
echo "</td>";
echo "</tr>";
echo "</tbody>";
echo "</table>";
echo "<p>&nbsp;</p>";
}
?>