<?php $image_dir = scandir("images"); $images = array_diff($image_dir, array('.', '..')); var_dump($images); ?>
This loads the specified directory contents into an array which is a good start!
The array_diff function removes the . and .. from the array (linux server).
I'm then left with image1, image1_thumb, image2, image2_thumb, etc. in the array.
I want to split these into separate items, so that the image and the thumb associated with that image will each have it's own section in the array? I hope that makes sense.
Edit: urgh wrong section, should be in web design and programming.