Trying to think of a way to dynamically add text for each image
<p>I'm trying to think of a way to make this happen.</p>

<p>I'm using a jQuery slideshow to display images, and a simple php script to pull the images from a folder based on which gallery the user selects:</p>

<pre><code>    $handle = opendir(dirname(realpath(__FILE__)).'/../images/gallery/'.$gallery);
while($file = readdir($handle)){
    if($file !== '.' &amp;&amp; $file !== '..'){
        $pictures .= '&lt;img src="images/gallery/'.$gallery.'/'.$file.'" alt="" /&gt;';
    }
}
</code></pre>

<p>I'm doing it this way since there are 6 different galleries, and the amount of photos in each gallery varies, from about 25 - 40 pictures. If I did the site staticly, or had a database running it'd be no problem, but I can't think of a PHP way of doing this.</p>

<p>Basically here is an example of what I'm hoping to do: <a href="http://diguiseppi.com/Brad/index.php?cat=Create&amp;do=International-Gallery" rel="nofollow">I hard coded all the images and text</a> </p>

<p>But on <a href="http://diguiseppi.com/Brad/index.php?cat=Create&amp;do=Gallery" rel="nofollow">this page</a> I can't think of a good way of doing it</p>
