Mutley Posted September 19, 2006 Share Posted September 19, 2006 Simple put:[code]$thumbnail_files = glob($thumbnail_folder . "/*jpg");[/code]I would like it to find "jpg" AND "JPG" not just jpg which it is atm.Can't seem to get it to work however. If anyone knows how? Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 19, 2006 Share Posted September 19, 2006 I dont know glob very well, I have checked the manual, and I cant see any flags which is about case sensativetry ADDING$thumbnail_files .= glob($thumbnail_folder . "/*JPG"); Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 19, 2006 Share Posted September 19, 2006 Use glob_brace - direct from the manual - http://ca.php.net/manual/en/function.glob.php[quote]Here's an example of how to use the GLOB_BRACE flag:$images = glob("/path/to/images/{*.jpg,*.JPG}", GLOB_BRACE);It's also worth noting that when using the GLOB_BRACE flag in any version of PHP prior to 4.3.4, PHP will crash if no matches are found.[/quote] 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.