I am not a programmer by any means. I mainly just edit code for our website the best I can, and its usually a hack job at that. I am in need of some assistance. The web programmer that was here got fired and we are trying to find a new one so I am left to do the best I can.
We have this php function that lists the contents of a directory as links by a extension. However they want to add files other then PDF's, such as .jpg, to the folder and have them show up as well. I cannot figure it out.
If anyone could help me out it would be greatly appreciated, below is the code I am referencing.
$dir = "labels/"; // Directory where files are stored
if ($dir_list = opendir($dir))
while(($filename = readdir($dir_list)) !== false)
font-family: Arial, Helvetica, sans-serif;
<p><a href="<?php echo $dir, $filename; ?>"><?php echo $filename;?></a></p>