• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to call a variable from other class

#1
[eluser]cinewbie81[/eluser]
Hi guys,

I have a file 'globalsetting.php' as following:

Code:
<?php

class Globalsetting extends Controller {

    function Globalsetting()
    {    
        parent::Controller();
    }

    // Initialization function  
    function Initialize()
    {
           $DB1 = $this->load->database('MYDB1', TRUE);
           $DB2 = $this->load->database('myDB2', TRUE);
           $MyClient = "DELL";            
    }
}

My problem is:

How can i call variables DB1, DB2, and MyClient from other controller class ?? Anyone ? IS that correct that I put Globalsetting class extend from controller ? Hope someone can helkp as I'm stuck here for quite a while .. thanks in advance


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.