<?php
$the_path = "path";
function list_files() {
global $the_path;
$handle = dir($the_path);
while ($file = $handle->read()) {
if (($file != ".") && ($file != "..")) {
print "$file" . "<BR>";
}
}
}
?>
I'm trying to list all the contant found in a dir in a dropdown box the code above works fine but the only problem is that all of the contant found in the Dir are list on one line of the dropdown and not seperate lines so 4 Items found shows like
item1item2item3item4 instead of
item1
item2
item3
item4
can any one help with this problem.
TIA
Richie TM