pull all images from a specified directory and then display them
<p>how to display the image from a specified directory? like i want to display all the png images from a directory, in my case my directory is media/images/iconized.</p>

<p>i tried to look around but seems none of them fits what i really needed.</p>

<p>but here's my try.</p>

<pre><code>$dirname = "media/images/iconized/";
$images = scandir($dirname);
$ignore = Array(".", "..");
foreach($images as $curimg){
if(!in_array($curimg, $ignore)) {
echo "&lt;img src='media/images/iconized/$curimg' /&gt;&lt;br&gt;\n";
};
}
</code></pre>

<p>hope someone here could help. Im open in any ideas, recommendation and suggestion, thank you.</p>
