thanks, i picked the first one i found and it didnt work but after some code changes i've got it working fine
<?php
function scandir_recursive($directory) {
$folderContents = array();
$directory = realpath($directory);
foreach (scandir($directory) as $folderItem) {
if ($folderItem != "." AND $folderItem != "..") {
if (is_dir($directory."/".$folderItem)) {
$folderContents[$folderItem] = scandir_recursive($directory."/".$folderItem);
}
else {
if (is_dir($folderItem)) {
$folderContents[] = $folderItem;
}
}
}
}
return $folderContents;
}
print_r(scandir_recursive("."));
?>
how could i get this to show the complete directory to the folder, instead of just storing it in an array.
i tried something, but it failed completely so it isnt worth showing.
anyone have any ideas how to make it show something like
/includes/main
for each folder and its subfolders?
thanks again, Jon