I have a situation in codeigniter. I am declaring all the CSS ($impcss) and JavaScript ($impjs) files in an array and calling them inside a function:
public function index()
{
// Load css here
$impcss = array("style.css","color.css","transitions.css","bootstrap.css","bootstrap-responsive.css","jquery.bxslider.css","owl.carousel.css","parallax.css");
$data['impcss'] = $impcss;
//Load js here
$impjs = array("jquery-1.11.0.min.js","bootstrap.min.js","jquery.bxslider.min.js","owl.carousel.js","modernizr.js","skrollr.min.js","functions.js");
$data['impjs'] = $impjs;
$this->load->view('layout/metainfo',$data);
$this->load->view('layout/header');
$this->load->view('homeView');
$this->load->view('layout/footer');
}
I want to use the same files in many other functions like the index() function so I want to declare them globally and call them in other functions too. Please help me.