title: PHP: Directory Navigation Menu
body: <p>I have a question that I haven't been able to find the answer/script to. I'm just learning to use PHP. I'm using Perch as a CMS and has been going great so far. </p>
  
  <p>I've run into a snag when it comes to adding new pages. Something that I want PHP to do is be able to create a dynamic navigation menu for only that directory. </p>
  
  <p>For example, I have three pages in my 'about' directory.</p>
  
  <p><code>root
  /about
  /index.php
  - page2.php
  - page3.php</code></p>
  
  <p>I want to be able to output a side navigation menu based off only that directory. </p>
  
  <p><code>Home - Page2 - Page3</code></p>
  
  <p>And when the client/user creates a new page, it'll automatically add it to the list. So...</p>
  
  <p><code>root /about /index.php - page2.php - page3.php - newPage.php</code></p>
  
  <p>...creates...</p>
  
  <p><code>Home - Page2 - Page3 - New Page</code></p>
  
  <p>Can anyone point me into a direction of a script or help me get started?</p>
  
  <p>Thanks!</p>