Posted 26 June 2013 - 01:08 PM
I guess I should post this here and not in Ask a Pro.
I'm having trouble with this. It only prints .. when running this, even though there are 2 folders in the dir.
Can anyone help me?
$allFiles = scandir($userDir);
for ($i = 1;$i < count($allFiles); $i++) {
//echo $allFiles[$i]."\n";
if (is_Dir($allFiles[$i])) {
echo "[$allFiles[$i] \n"]";
} else {
echo "Nope: $allFiles[$i] \n";
}
}
//print_r($allFiles);
I'm having trouble with this. It only prints .. when running this, even though there are 2 folders in the dir.
Can anyone help me?