Welcome Guest, Not a member yet? Register   Sign In
where to put vars for use in all controller's functions?
#8

[eluser]alpineedge3[/eluser]
ha even the mega array of death cannot squash my problems. When I array_merge in the constructor, I get an error that argument #2 (i.e. $this->globalArray) is not an array. Here's my global class:

Code:
class Myglobals extends Controller {

    // This class sets up static variables throughout the site.
    // It also extends the Controller class, required for all controllers.
    
    var $globalArray;
    
    function Myglobals(){
        parent::Controller();
        $this->load->helper('url');
        $this->globalArray =
                        array(
                                'title' => 'marzloff media - ',
                                'sections' => array('home','news','photo','art','music','cv','links')
                                            
                        );
    }
        
}

so why doesn't it think it's an array?


Messages In This Thread
where to put vars for use in all controller's functions? - by El Forum - 12-29-2007, 03:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB