What is the best way to turn a filehandle into an array?

This is the code I've got now, but I don't like it because it's rather in
efficient for my purposes. I can format this to be much prettier, but I'm
not too concerned about it right now. I'd just like to get the filehandles
to work. 

------snip------
<?
if ($dr == null)
        $dir=opendir("./");
else
        $dir=opendir("$dr");

exec("ls  $dir", $ls);
print "<pre>\n";
for($i=0;$i<sizeof($ls);$i++) {
 print $ls[$i]."\n";
}
print "</pre>\n";
?>
------snip------

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [EMAIL PROTECTED] 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to