note 95200 deleted from function.glob by danbrown

From: Date: Fri, 18 Dec 2009 15:43:14 +0000
Subject: note 95200 deleted from function.glob by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164113@lists.php.net to get a copy of this message
Note Submitter: seth ---- Thanks Haro!!! I made this great one liner (and some arrays) from that tip that could be messed with to make even better. List all dirs in current dir , list all files and dirnames in the next 3 levels of subdirs (this is all i needed). $ins = array("Array","(\n",")\n","[",); $outs = array("File List","<br /> <p style='font-size:.777em' id='list'>","<br /> </p>","<br />["); echo str_replace($ins, $outs, print_r(glob('{**/*,**/**/*,**/**/**/*}', GLOB_BRACE), TRUE)); Cheers!

« previous php.notes (#164113) next »