I am getting images using this glob pattern, but the code looks really bad.
First I get all images which have the name screenshot + a number from 0-9 in an array, after that I get all screenshort + a number from 10-99 and so on.
I want to improve this code.
$dirScreenshotsOne[] = glob($value.'/screenshot[0-9].png'); // 0-9
$dirScreenshotsTwo[] = glob($value.'/screenshot[0-9][0-9].png'); // 10-99
$dirScreenshotsThree[] = glob($value.'/screenshot[0-9][0-9][0-9].png'); // 100-999
$dirScreenshotsAll = array_merge(
$dirScreenshotsOne,
$dirScreenshotsTwo,
$dirScreenshotsThree);
foreach($dirScreenshotsAll as $screenshotKey => $screenshotValue)
...