Possible Plan of Action my_function($field_name) {
$field_value = $_GLOBALS[$field_name]; // get value of field variable
// sample function action
echo '$'. $field_name .' contains the value: '. $field_value;
return;
// end sample
}
Now say you have $j, that has the value 5.
The following:
my_function('j');
Prints out:
"$j contains the value: 5"
---------------------------
I'm confused what the purpose is of the function, but the code above would help you get the variable value with just the variable name alone.