Richard Lynch writes:

> function do_each($passed_array) {
>     
> global ${$tmp_var_name};

Move this:

> 
>     if (substr($passed_array[0],-5) == "_post") {
>         $tmp_var_name = substr($passed_array[0],0,-5);
>         ${$tmp_var_name} = $passed_array[1];

down here.

>         return(${$tmp_var_name});
>     }
> }

Yes, I did that.  I must've been going in a different direction when I made
it two functions.  

Problem reamins:  Before exiting the function, I can print the true variable
name/value pair.  As soon as I exit the function, the same print statement
returns "".  Is it possible to make the variable variable global?  Here's
what I know have:

function conv_vars($input) {

    global ${$tmp_var_name};
        
    if (IsSet($input)) {
        while ($each_array = each($input)) {
            if (is_array($each_array[1])) {
                conv_vars($each_array[1]);
            }
            else {
                if (substr($each_array[0],-5) == "_post") {
                    $tmp_var_name = substr($each_array[0],0,-5);
                    ${$tmp_var_name} = $each_array[1];
                }
            }
        }
    }
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to