06-30-2008, 03:36 AM
[eluser]Pascal Kriete[/eluser]
The load->vars function is used to pass variables to views (not to mention it extracts them). What you want here is a class variable.
The load->vars function is used to pass variables to views (not to mention it extracts them). What you want here is a class variable.
Code:
class Blog {
var $pr;
function Blog()
{
parent::Controller();
$this->pr = array(1, 2);
}
function index()
{
print_r($this->pr);
]
}