i have below a function called test thats being called, and just echos "test" keeping it simple, for this question.
test();
function test() {
echo "do something";
}
However i want to try and make the function dynamic if thats the right choice of words.
I have a list of records in a database, and based on each record, i may want a different function to process that record, the idea then is to have a field in the database which would be function_name, i then use that field to some how call that function.
Like this
test();
$function_name = "test";
function $function_name() {
echo "do something here";
}
the only way i can think to get around this is to use switch/case but that is going to cause me other issues down the line.