$folder = "docs";
$searchpath = sprintf("../docs/%s/i*.jpeg", $folder);
foreach (glob($searchpath) as $filename) {
printf('<div><img src="%s" /></div>', $filename);
}
If file be called from HTML, relative folder is required.
By
$folder = "docs";
$searchpath = sprintf("../docs/%s/i*.jpeg", $folder);
foreach (glob($searchpath) as $filename) {
printf('<div><img src="%s" /></div>', $filename);
}
If file be called from HTML, relative folder is required.