How to put variables into calling scope in PHP?
<p>The built-in PHP function parse_str( $str ) parses a query string and sets the variables from it into the current scope. Is there any way for me to create my own function that does something like this and returns values to the scope of the caller?</p>

<p>Example:</p>

<pre><code>function checkset()
{
    global $inputs;
    for( $counter = 0, $varname = func_get_arg($counter), $counter++)
    {
        if(isset($inputs[$varname]))
        {
            calling_scope( $varname, $inputs[$varname] );
        }
    }
    return;
}
</code></pre>

<p>where calling_scope( $varname, $value) would be a function that sets $$varname in the scope where the function is called to $value. Any help is appreciated.</p>
