I am currently attempting to read files from a directory and display them as links. I have written the code below, but I am sure I am doing this wrong. Any help would be great!
$directory ="/pelleleathers/pdf/$section/";
$currfile= "";
$mydirectory = "/home/groupvertical/www/pelleleathers/pdf/$section/";
$handle = opendir($mydirectory);
while ($currfile = readdir($handle))
{
//echo "<a href=\"$directory$currfile\">$currfile</a>";
echo "<br>";
closedir($handle);
}