On Tue, 30 Aug 2005 23:54:53 +1000, in php.internals [EMAIL PROTECTED] (Kevin Waterson) wrote:
>I would like to make this > >array glob ( array patterns [, int flags] ) > >This would tidy up much code where a series of OR's are used to match >different patterns. > >$arr = array('jpg', 'gif', 'tif', 'pdf', 'bmp', 'raw'); >foreach(glob($arr as $file)){ echo $file; } glob is currently extremely flexible in its input with the right flags and can expand a list. Eg: print_r(glob("*.{jpg,gif,tif,pdf,bmp,raw}",GLOB_BRACE)); If all you want is to supply glob() with a list of full or partial patterns I think the desired functionality is already present. -- - Peter Brodersen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php