When I use the function var_dump, in my file php, It doesn't print the array like before. I haven't touched the file php.ini in my wampserver,
function getFolder_recursive(&$array,$dir){
if(is_dir($dir)){
$handle=opendir($dir);
while (false!== ($entry=readdir($handle))) {
if ($entry != "." && $entry != "..") {
if (is_dir($dir.$entry)){
$allFiles[]= "D: " . $dir . "/" . $entry;
// echo "<a href='http://localhost/eclipse/access_log/logfiles.php?cartella=$c' class='btn btn-light>Cartella</a>";
}
else{
$allFiles[]="F: " . $dir . "/" . $entry;
}
}
}
closedir($handle);
--> var_dump($allFiles);
}
return $array;
}
This is how it prints:
array(7) { [0]=> string(22) "D: files/log_files//10" [1]=> string(21) "D: files/log_files//2" [2]=> string(21) "D: files/log_files//3" [3]=> string(21) "D: files/log_files//4" [4]=> string(21) "D: files/log_files//6" [5]=> string(21) "D: files/log_files//7" [6]=> string(21) "D: files/log_files//
I expect that var_dump prints my array formatted