Having trouble with displaying my data from controller in View.
Searched for this, tried few things and still not working for me.
My controller:
public function microBitcoin()
{
$arr = array('hashtag' => 'myhashtag', 'tweet_id' => '673899616799191040');
$data = array();
$data['liczba_tweetow'] = $this->load->library('Twetterclass', $arr);
$this->load->view('micro_btc', $data);
}
My View:
<?php print_r($data); ?>
<?php echo $data['$liczba_tweetow']; ?>
//tried with $data->liczba_tweetow;
I still get the same error:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: data
Filename: views/micro_btc.php
How I can display this variable in my View?