title: PHP parse URL image directory
body: <p>I have some script which output the images, with an interval of 5 seconds, on a screen.
  All images are in a directory called <code>images/easter</code>.
  The URL to display the webpage is <code>http://'localhost'/index.php</code>.
  In the <code>index.php</code> I have a variable: <code>$directory = 'images/easter/</code>.</p>
  
  <p>We want users create a new image directory and upload pictures to it (eg <code>images/holiday</code>).
  The new images have to be displayed with a simple change in the url.</p>
  
  <pre><code>http://'localhost'/index.php?holiday
  </code></pre>
  
  <p>I think this can be done by URL parsing in PHP. But how to script this?</p>
  
  <p>Thanks in advanced.</p>