Re: Re: glob to take array as an arg

From: Date: Wed, 31 Aug 2005 01:39:04 +0000
Subject: Re: Re: glob to take array as an arg
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-18589@lists.php.net to get a copy of this message
This one time, at band camp, Peter Brodersen <php@ter.dk> wrote: > >$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)); True, but not available to all. It is GNU. Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote."

« previous php.internals (#18589) next »