This currently works:
$get_pending_list_action = "get_pending_list_".$action;
$data = $this->sectorswaps->{$get_pending_list_action}($list);
Is there anyway to make it so I can turn this into one line?
i.e. this does NOT work:
$data = $this->sectorswaps->get_pending_list_{$action}($list);
Is there some other way that I dont know of?
$data = $this->sectorswaps->{"get_pending_list_".$action}($list);