I have a code here that gets all images in a folder including subfolders. What can i do to fetch images only from the folder but not the subfolder?
$dirname = "media/images/iconized/";
$images = glob($dirname."*.png");
foreach($images as $image) {
echo '<img src="'.$image.'" /><br />';
}