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. Link to comment https://forums.phpfreaks.com/topic/218320-foreach-one-line-problem/ 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 Link to comment https://forums.phpfreaks.com/topic/218320-foreach-one-line-problem/#findComment-1132767 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.