Ok guys, this one may be quite simple or quite complicated, and I wasn't sure where to post so here we go. I am trying to create something that will allow for a given directory to be listed for a certain file type, then each file that matches the given file type is then entered into a given array. This array will then be listed with a link to each file that will then be used to change the source value of a object/param attribute. Hope that makes sense...I am gonna be honest I can see how i want it to work and everything, just can't figure all of the coding out, so if you can at least try to help point me in a good direction it would greatly be appreciated. and sorry ahead of time for my poor 'psuedo' code...
<?php
# Specified Directory to Browse
$spec_dir = "/folder/to/files";
# Specified File Type Extension to Browse for
$spec_typ = "ext";
# Array of Matching Files
$file_ary = array();
# Function to add files to array
function add_file() {
foreach ($file_ary as $file_name)
};
?>
the information that is added to the $ file_ary will then be turned into a list of links pertaining to each file found. when the link is clicked, the $file_src variable will be changed in the section of code that looks like:
<object id = "file_viewer" ...>
<param name="Src" value="<?=$file_src ?>">
</object>
Hope this is enough info to help get this started...I will admit this is my first 'large' project, and i just want to make sure that i actually approach it correctly. Thanks in advance.