$this->$function();
Basically I'm calling a function to generate a report and have an array of about 15 function names so I know which function to call for which report:
$this->report_list[2] = array(
"report_name" => "Agent Comm per Product Group",
"report_function" => "agent_comm_per_product_group",
"report_export_csv" => true,
"report_select_dates" => false,
"report_select_agent" => false
);
Ref: http://php.net/manual/en/functions.variable-functions.php
No comments:
Post a Comment