I have an array like this
$meta = array(
'meta_description' => 'lorem ipsum',
'meta_keywords' => 'this, is, a, keyword'
);
If I have this in my controller method, I can pass it to a partial like so: $this->template->set_partial('header', 'layouts/header', $meta) and it passes fine.
I store the meta tags in the database, so I'd ideally like to put it in MY_Controller and populate the array based on the database values for that post's meta tags.
If I move it outside of the controller method, I get Message: Undefined variable: meta
as an error.
How can I make it globally available?