[eluser]solid9[/eluser]
All I just want is to declare the $data as public and as an array variable.
So that I can access it in every function of the class.
But it failed.
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$data = array();
class Main extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->helper('form');
$this->load->helper('html');
$this->load->helper('url');
$this->load->library('ion_auth');
$this->load->library('session');
$this->load->library('form_validation');
$this->load->database();
//$this->load->model('prod_m');
}
function login()
{
$this->$data['header'] = $this->load->view('header', null, TRUE);
$this->load->view('front_page', $this->data);
}
}
/* End of file main.php */
/* Location: ./application/controllers/main.php */
any help please.
Thanks in advanced