In perl, when you read a directory, you can set it to a @, or array variable, and then run a foreach so you can list them all, or do whatever you like to them.
In PHP, when you open a directory, how do you set it to a array variable??
Thank you.
This should do what you want:
<ul> <? $dirname = "/path/to/whatever/";
if ($dir = @opendir("$dirpath")) { while (($file = readdir($dir)) !== false) { if ($file != "." && $file != "..") { echo "<li><a href="$dirname/$file">$file</a>\n"; } } closedir($dir); } ?> </ul>
thank you