Make array from directory

Hey guys, im trying to put together a script that pulls all the videos from a certain directory.
But im stuck at getting the filenames from the directory. I wonder if any of you could help out.

What im looking to do is have a script that checks a certain directory on a webserver and builds and array from the filenames.

Thanks
Duck