[eluser]Brandon Beasley[/eluser]
Home Controller
Code:
<?php
class Home extends Controller {
function Home(){
parent::Controller();
}
public function index()
{
$data = new stdClass(); // WORKING
$data->trends = $this->twitter->search('trends'); // WORKING
// print_r($data);
$this->load->view('trends_view', $data);
The results of print_r when executed on Home is displaying the object, but the View is not getting the $data variable passed to it.
trends_view View
Code:
<?php print_r($data); ?>
This is what is returned:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: data
Filename: views/trends_view.php
This is my first post, go easy on me