Hey guys,
I need help deleting all the elements in an array so that I can re use it in a loop.
loop
{
add elements to an array
use array
delete array
}
I hope this makes sense. To help you understand what I'm trying to do. I have a directory with sub directories in it. each sub directory has files number 1.inc, 2.inc, 3.inc and so on. I want to go through each sub directory, and print out the files, in numerical order, higher numbers first. This it the only way I can think of. Does anyone know a better way.
while (false!=($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$review_list[] = $file;
}
rsort($review_list);
Print out each element of review_list
Reset review_list for next directory
}