I've been trying to fiddle with this code to no avail, my goal is to... well basically what the title says, post the individual images, but all the code does is post everything from the folder and that's not what I want... Here is the code:
PHP Code:$dir_contents = scandir($dir);
foreach ($dir_contents as $file)
{
$file_type = strtolower(end(explode('.', $file)));
if ($file !== '.' && $file !== '..' && in_array($file_type, $file_display) == true)
{
$animeimg = '<img src="' . $dir . '/' . $file . '" alt="' . $file . '" width="80px;" height="100px" />';
echo $file;
$template->assign_block_vars('animeimg', array(
'IMG' => $animeimg,
));
$sql = "SELECT image, name, description FROM phpbb_anime";
$result = $db->sql_query($sql);
}
}



Reply With Quote

Bookmarks