I have a controller method that uses the table library:
public function index()
{
.....
$this->load->library('table')
....
and another method that generates the table using the table library:
function _generateTableHTML($tabledata)
{
....
The problem is that table library is only loaded in the index method, so when the _generateTableHTML()
method is run it errors because it is missing the library.
Should I add $this->load->library('table')
to the _generateTableHTML()
method as well so it is loaded twice? Or is there a better way to load it so that it is available to all/both methods?