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? Link to comment https://forums.phpfreaks.com/topic/21255-glob-function-anyone-know-it/ 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"); Link to comment https://forums.phpfreaks.com/topic/21255-glob-function-anyone-know-it/#findComment-94530 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] Link to comment https://forums.phpfreaks.com/topic/21255-glob-function-anyone-know-it/#findComment-94534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.