I have this code that lists all the folders in a directory and numbers each folder, but my desire is to be able to go to a specific folder when I want to start, for example:
The code listed all folders after that done, I would like to go to folder 40 how do I get the path of folder number 40 ? I would like to write a file there.
I thought about putting the folders in an array, but there is nothing simpler where I don't need to use an array because it will be a very large directory I will make a repository.
List folder source:
$foldercount = 0;
foreach (glob("folderlist/") as $folder) {
$foldercount++;
}