note 94294 deleted from function.scandir by googleguy

From: Date: Tue, 22 Oct 2013 11:18:02 +0000
Subject: note 94294 deleted from function.scandir by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197091@lists.php.net to get a copy of this message
Note Submitter: Dustin ---- Another getDirectoryTree with filters: <?php function getDirectoryTree( $outerDir, $filters = array() ){ $dirs = array_diff( scandir( $outerDir ), array_merge( Array( ".", ".." ), $filters ) ); $dir_array = Array(); foreach( $dirs as $d ) $dir_array[ $d ] = is_dir($outerDir."/".$d) ? getDirectoryTree( $outerDir."/".$d, $filters ) : $dir_array[ $d ] = $d; return $dir_array; } ?>

« previous php.notes (#197091) next »