Re: [PHP] renaming form posted variable names

2001-04-02 Thread David Minor
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(${$

Re: [PHP] renaming form posted variable names

2001-04-02 Thread Richard Lynch
> > 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}); >

[PHP] renaming form posted variable names

2001-03-30 Thread David Minor
I've got a logic problem that I just can't think through. I'm hoping that you can help me find a better way to do this. I need a function that will iterate through $HTTP_POST_VARS looking for variable names with a predefined suffix ($example_post). Then I want to save the value of this var in a