Display all images

I have a folder full of images, ad im trying to use php to display them, is this right?

$handle = opendir(dirname(realpath(__FILE__)).'/../images/dolls/'.$row['id']);
while($file = readdir($handle)){
echo '<img src="realpath(__FILE__)).'/../images/dolls/'.$file.'" border="0" />';

Did you run it and test if it works?

I dont see the images
here is the folder im trying to look into
it has nine images in it (1-9.jpg)

wordpress is strange, cause I get this
output by

    echo realpath(dirname(__FILE__));

I would use glob with relative paths and echo $ file in your while loop to see what it contains. Also does $row[‘id’] contain anything?

Try this and scroll to the bottom for the source;

ok, so its working,

$files = glob("wp-content/themes/nikkistheme/images/dolls/".$id."/*.jpg");
foreach($files as $file){
echo '<img src="'.$file.'" border="0" />';

is this ok?