title: Display images from directory with PHP
body: <p>i'm new to PHP and jQuery but i would like to do the following things to a portfolio that i'm developing using easySlider and Lightbox plugin:</p>
  
  <ol>
  <li><p>Display a limit of six images or six div images per "li" tag and close it from a directory.</p>
  
  <ul>
  <li><p>If there is more than six images on the directory, create a new "li" tag and show six more images, till all the images from that directory are loaded.</p></li>
  <li><p>If an image has a name with a number after -> display: Hidden. For example: beta1 but i only want to show the first one "beta"</p></li>
  <li><p>Sort images by name.</p></li>
  </ul></li>
  <li><p>Don't let anyone access to the images on that directory, if it isn't the code itself.</p></li>
  </ol>
  
  <p>The code for portfolio is the following:</p>
  
  <pre><code>&lt;div id="portfolio_hold"&gt;
     &lt;ul&gt;
  
       &lt;li&gt;
        &lt;div class="portfolio_pic_hold"&gt;
  
          &lt;a href="large.jpg" rel="lightbox[]" &gt;
            &lt;img src="thumb.jpg"/&gt;
          &lt;/a&gt;
  
        &lt;/div&gt;
       &lt;/li&gt;
  
     &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my html example of what i want to show.</p>