HI
try something likw this
$my_files=array();
for ($i=0; $i<$some_var; $i++) {
.............
$other_var = "your generated filename"; // this variable is the output of the function or expresion that generates the filename
$my_files[$i] = $othervar;
}
this could be used with while statement too.
and now you have an array with elements 0.1.2.... $somevar-1
🆒