Hello.
I've created a 1-D array of pre-defined list of selected var names that I've added to a function's 'global' statement instead of listing them individually in the global statement each time they're needed.
Upon form submission, the form data becomes '$GLOBALS[var_name] = some_value'.
What is the best way to reverse a '$GLOBALS[var_name] = some_value' back to its pre-defined form '$var_name = some_value' and put them into the namespace within the function where the original variables are called? 😕
I've created the selected list of vars so that the reversal is not done for every var in the $GLOBALS array.
There are separate files included in the function that call the original pre-defined var name syntax.
Thanks.
EDIT: Not all of the vars needed are from the form submission so therefore, all are not in $_POST.