note 74234 deleted from function.scandir by philip

From: Date: Sun, 01 Apr 2007 09:33:14 +0000
Subject: note 74234 deleted from function.scandir by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-124988@lists.php.net to get a copy of this message
Note Submitter: csungbae at paran dot com ---- ================================= Directory List Array (include "No Dot" option) ================================= function dir_list($dir, $no_dot=true) { $dirArray = array(); if(is_dir($dir)) { $dirList = scandir($dir); foreach($dirList as $key=>$value) { if(is_dir("$dir/$value")) { if($no_dot && ($value == "." || $value == "..")) continue; else array_push($dirArray, $value); } } } return $dirArray; }

« previous php.notes (#124988) next »