title: Print the keys of an array
body: <p>I could not figure out how to pass a variable number of variables into a function. I thought passing in an array and using the array keys for the variables names could replace the need to pass extra variables into the function, and it worked (I'm sure there is a better way to accomplish this, suggestions welcome). However, I can't seem to get the keys out of the array inside the function.</p>
  <p>The array:</p>
  <pre><code>  $parameters[day] = 1;
    $parameters[month] = 8;
    $parameters[year] = 2010; 
  </code></pre>
  <p>Inside the function:</p>
  <pre><code>foreach(key($parameters) as $key)
  {
     print($key);
     print(&quot;&lt;br&gt;&quot;);
  }
  </code></pre>
  <p>The code inside the function retuns a warning: Invalid argument supplied for foreach(). How can I pull the keys out of the array?</p>