title: array of names = get correct file
body: <p>I'm trying to write a list of files and drop them into an array.
  Have to change the content on a page calling external contents.</p>
  
  <p>I've found this little piece of code and trying to make it work.
  <a href="http://woork.blogspot.com/2007/10/load-page-using-url-variables-and-php.html" rel="nofollow">LINK</a> (last comment) </p>
  
  <pre><code>$all_pages=array("main","page_two","page_three");    
  $page = $_GET['page'];    
  if( isset($page) and array_key_exists("$page", $all_pages) ) // added a missing ')'
  {
  include('subfolder/folder/'.$_GET['$page'].'.html');
  }
  </code></pre>
  
  <p>well, this does not work.
  Just can't get to the right file. (the content shows always empty).</p>
  
  <p>I (try to) call the files like:</p>
  
  <pre><code>&lt;ul&gt;    
     &lt;li&gt;&lt;a href="template.php?main"&gt;Main content&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="template.php?page_two"&gt;Second content&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="template.php?page_three"&gt;Third content&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Thanks in advance!</p>