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(${$
>
> 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});
>
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
3 matches
Mail list logo