Very basic gallery
Posted: Sat Nov 26, 2005 5:38 am
Ok I coded this gallery for my website a while ago, I did evertyhing myself with some help from Vercz I think. Anyway I would like to get the images to show in 2 Rows instead of 1.
Here's the code, if you can you may improve it but then I would like to know what you change and why /blum.gif' class='bbc_emoticon' alt=':P' /> so I learn something from it.
Thanks In advance.
Here's the code, if you can you may improve it but then I would like to know what you change and why /blum.gif' class='bbc_emoticon' alt=':P' /> so I learn something from it.
Code: Select all
<?php
if ($handle = opendir('Portfolio')) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..' && preg_match("/prev/",$file)) {
$open = str_replace("(prev)","",$file);
$show = str_replace(".jpg","",$open);
echo " <b> $show </b><br><a href=\"Portfolio/{$open}\" target=\"\_blank\"><img src=\"Portfolio/{$file}\" alt=\"\" border=\"0\" /></a><br><br>";
}
}
closedir($handle);
}
?>