Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35381 invoked by uid 1010); 31 Aug 2005 01:40:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35366 invoked from network); 31 Aug 2005 01:40:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2005 01:40:38 -0000 X-Host-Fingerprint: 209.190.22.60 mx.ozziehost.net.au Linux 2.5 (sometimes 2.4) (4) Received: from ([209.190.22.60:2108] helo=mx.ozziehost.net.au) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 01/A6-15098-59A05134 for ; Tue, 30 Aug 2005 21:40:37 -0400 Received: from swamp.oceania.net (245-27-251-64.serverpronto.com [64.251.31.245] (may be forged)) by mx.ozziehost.net.au (8.12.10/8.12.10) with ESMTP id j7V1eYbM027284 for ; Wed, 31 Aug 2005 11:40:34 +1000 Received: from kevin.oceania.net (203-129-148-174.rev.dft.net.au [203.129.148.174] (may be forged)) by swamp.oceania.net (8.13.4/8.13.1) with SMTP id j7V1bAH9006314 for ; Wed, 31 Aug 2005 11:37:12 +1000 Date: Wed, 31 Aug 2005 11:39:04 +1000 To: internals@lists.php.net Message-ID: <20050831113904.42421a66.kevin@oceania.net> In-Reply-To: References: <20050830235453.4e94a8bd.kevin@oceania.net> Organization: Oceania X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-vine-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: glob to take array as an arg From: kevin@oceania.net (Kevin Waterson) This one time, at band camp, Peter Brodersen 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."