I am trying to create a function within a loop and the name of the function needs to change for each time it is executed.
Here is the function that works:
add_filter("gform_field_value_eventname", 'populate_event');
function populate_event($value){
return $eventtitle;
but I need it to do something like this, where a variable could be added to the name of the function:
add_filter("gform_field_value_eventname", 'populate_event'.$y);
function populate_event.$y($value){
return $eventtitle;
Please could somebody point me in the right direction
Thanks