[eluser]bill19[/eluser]
Hello all,
I am trying to print out the output of the table class in a view, but I'm getting the following:
Quote:Severity: Notice
Message: Undefined variable: output
Here's my controller code:
Code:
$sql="Select * from data where id=$var1";
echo $sql;
$data=R::getall($sql);
$output= $this->table->generate($data);
echo $output; // this works correctly
$this->load->view('table_widget',array($output));
//
Here's my view code:
Code:
<?php
echo $output;
?>
I can print out correct output in controller but not view.can anyone give me some pointers.
Thank you,
Bill