$title "; echo "
"; echo ""; if ($dh = opendir( $dir )){ while( $file = readdir( $dh ) ) { $filepath = $dir.$file; if( is_file( $filepath ) and ereg( "\.jpg$", $file ) ) { $gallery[] = $filepath; } } sort( $gallery ); foreach( $gallery as $image ) { $path_parts = pathinfo($image); $filename = $path_parts['filename']; echo "$filename"; } } } echo ""; echo "
" ?>