title: Get list of cases in switch statement
body: <p>I use a PHP Switch statement to determine the pages of my website.  So here is an example:</p>
  
  <pre><code>switch($page) {
      case "about":
          $title_name = "About Us";
          $page_content = "includes/about-us.php";
          include("inner.php");
      break;
      case "services":
          $title_name = "Services";
          $page_content = "includes/services.php";
          include("inner.php");
      break;
  }
  </code></pre>
  
  <p>And my file structure is <strong>index.php?page=about</strong> which converts to <strong>/about/</strong> using htaccess.</p>
  
  <p>What I want to do is take all of my pages in that switch statement and automatically grab it and put it in a list so I can automatically have it write to my footer page where I will have all of the links.</p>
  
  <p>So instead of manually typing in all of the links in the footer like: <em>Home  |  About Us |  Services |  FAQ</em> , it will pull it automatically based on the pages I provided in the Switch statement.</p>
  
  <p>Is there a way to do this?  It would also be good to automatically be able to add new pages and it will add a new case for the new page, and automatically create the page in the includes folder.  </p>
  
  <p>If anyone can point me in the right direction I would really appreciate it.  From my understanding, I don't believe you can do this with a switch statement, I would have to re-work the way I call the pages, right?</p>