printing a UL from an array of images
<p>I am trying to print a UL list of images ending with _th.jpg returned from a specific folder.  All i get back is array()</p>

<pre><code>&lt;?php
require '../../config.php';
$conn = new PDO(DB_DSN, DB_USER, DB_PASS);

$id = (int)$_GET['id'];
$q = $conn-&gt;query("SELECT * FROM cms_page WHERE id=$id"); 
$project = $q-&gt;fetch(PDO::FETCH_ASSOC);
$q-&gt;closeCursor();

$imagesDir = 'public/images/portfolio/'.$project['slug'].'/';
$images = glob($imagesDir . '*_th.{jpg,jpeg,png,gif}', GLOB_BRACE);

echo $imagesDir ;
print_r($images);

?&gt;

&lt;h1&gt;&lt;?=htmlspecialchars($project['title'])?&gt;&lt;/h1&gt;
&lt;?php 
if ($images &lt; 1) { 
    echo '&lt;div id="slider"&gt;';
    echo '&lt;ul&gt;';
     foreach($images as $key =&gt; $value) { 
      echo '&lt;li&gt;&lt;a href="public/images/portfolio/i-vis/1.jpg" rel="shadowbox[iVis]" title="Fully Content Managed Website"&gt;&lt;img src="public/images/portfolio/'.$project['title'].'/'.$value.'.jpg" width="160" height="96" /&gt;&lt;/a&gt;&lt;/li&gt;';
     }
    echo '&lt;/ul&gt;';
    echo '&lt;/div&gt;';
} else { 
    echo 'There are currently no images to display for tihis project.';
}
?&gt;
</code></pre>

<p>Anyone got any ideas?</p>
