note 1386 modified in readdir by ronabop

From: Date: Wed, 11 Oct 2000 04:00:47 +0000
Subject: note 1386 modified in readdir by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-6348@lists.php.net to get a copy of this message
Here's a quick code snippet that will load the directory data into an array. function GetDirArray($sPath) { //Load Directory Into Array $handle=opendir($sPath); while ($file = readdir($handle)) $retVal[count($retVal)] = $file; //Clean up and sort closedir($handle); sort($retVal); return $retVal; } http://www.php.net/manual/function.readdir.php

« previous php.notes (#6348) next »