I'm trying to create a dynamic for loop that echos all the images in a folder.
I'm using the query string to switch folders for the images. If you go to http://btseagrave.co.uk/ink/index.php?p=artists&artist=bianca you will see what I mean. On the artists page a file called gallery.inc.php is included which displays the images depending on which artist page its on. Here is the gallery.inc.php so far, I'm not sure why it isn't working. Any suggestions?
$directory = "images/$cartist/thumb/";
if (glob($directory . "*.jpeg") != false)
$filecount = count(glob($directory . "*.jpeg"));
$filecount = 0;
$cartist = $_GET['artist'];
echo "<a href='#'><img src='images/$cartist/thumb/$i.jpeg' alt='$cartist' /></a>";
the thumbnail images that I want to display are in images/artists/thumb (e.g images/bianca/thumb/1.jpeg & images/bryan/thumb/1.jpeg)
Also I don't have to stick to this method, if theres a better method please share!