CodeIgniter global variable
Posted
by Shishant
on Stack Overflow
See other posts from Stack Overflow
or by Shishant
Published on 2010-03-26T22:15:47Z
Indexed on
2010/03/26
22:43 UTC
Read the original article
Hit count: 440
codeigniter
|php
Hello,
I am using $data in all my views $this->load->view('my_view', $data);
I have also autoload a Controller following this guide Extending Core Controller
But I want to make $data global because in views
there is a sidebar which is constant for whole project and displays info fetched through db in autoloaded controller
Currently I have to manually write $data['todo'] for each and fetch info from autoloaded model.
Thank You.
© Stack Overflow or respective owner