Updating deprecated Code
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6044995/is-using-globalshttp-get-vars-deprecated">Is using $GLOBALS[&#39;HTTP_GET_VARS&#39;] deprecated?</a><br>
  <a href="http://stackoverflow.com/questions/8561822/invalid-arguements-in-php">Invalid arguements in php</a>  </p>
</blockquote>



<p>I get the following response when I run script in a WAMP environment:</p>

<blockquote>
  <p>Warning: Invalid argument supplied for foreach() in
  C:\wamp\www\GeCard\eCardScript_ecards\ecard_lib.php on line 17</p>
  
  <p>Warning: Invalid argument supplied for foreach() in
  C:\wamp\www\GeCard\eCardScript_ecards\ecard_lib.php on line 21</p>
</blockquote>

<p>This is my code:</p>

<pre><code>function getPostGetVars() {
    global $HTTP_POST_VARS,$HTTP_GET_VARS;

    foreach ($HTTP_POST_VARS as $key =&gt; $value) {  //This is line 17
        global $$key;
        $$key = $value;
    }

    foreach ($HTTP_GET_VARS as $key =&gt; $value) {   //This is line 21
        global $$key;
        $$key = $value;
    }
}
</code></pre>

<p>I am told that this code is deprecated. Can this piece of code be easily updated to eliminate the warnings?</p>
