PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
To be honest I no longer have it and im not to sure on what I done. I am positive I used a for() loop though. Im sure thats enough for you to know about what I did?.
if using the opendir method, we most often use a while loop.
each filename returned gets the starting path added to it, as readdir only returns names. This path is then checked to see if it's a file, which will increment a counter or add it to an array.. otherwise, it ignores the path. If an array is used, after the directory is processed, you can use [php_man]sizeof[/php_man]() or [php_man]count[/php_man]() to determine how many elements are in the array (number of files in this case)