PHP different locations for images and thumbs
<p>I have found some solution that work mostly but none that do the trick 100% what I am looking for is code that will look in all my albums in one directory and pull the images and also pull my thumbs that are in another folder and echo out the a string like this.</p>

<pre><code>echo '&lt;a href="',$img,'" rel="shadowbox"&gt;&lt;img src="',$img,'" /&gt;&lt;/a&gt;';
</code></pre>

<p>The problem is that my href image is in my images folder and my src (thumbnails) are in another directory.  I am using shadowbox and want the script to echo out a stirng that will allow both the directories to be scanned at the same time.</p>

<p>Below is what I am using that does scan the directorys but will not return the coresponding enter code herethumbnails that reside in another directory</p>

<pre><code>//path to directory to scan. i have included a wildcard for a subdirectory
$directory = "gallery_uploads/*/";

//get all image files with a .jpg extension.
$images = glob("" . $directory . "*.jpg");

$imgs = '';
// create array
foreach($images as $image){ $imgs[] = "$image"; }


//display images
foreach ($imgs as $img) {
     "&lt;a href='$img' rel='shadowbox'&gt;&lt;img src='$img' /&gt; ";


     echo'&lt;a href="',$img,'" rel="shadowbox"&gt;&lt;img src="',$img,'" /&gt;&lt;/a&gt;';
</code></pre>
