unistake Posted November 10, 2010 Share Posted November 10, 2010 Hi all, I have a lot of images in a directory called image1.jpg image1_thumb.jpg image2.jpg etc.. When I use this code foreach (glob('./aircraft/' . $_GET['reg'] . '*.jpg') as $file) The foreach statement gets the _thumb.jpg images - I am trying to just get the images without _thumb.jpg at the end. What is wrong with it? I am guessing it is the *.jpg but I have tried taking that out and the script then does not work. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
unistake Posted November 10, 2010 Author Share Posted November 10, 2010 used [0-8].jpg instead of *.jpg Thanks Salathe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.