Welcome Guest, Not a member yet? Register   Sign In
Global Strings!
#7

[eluser]Twisted1919[/eluser]
Weird, but what if, you do like so :
Code:
//MY CONTROLLER
class MY_Controller extends Controller{

    public $data = array();
    [...]
    public function __construct(){
       parent::Controller();
       $this->data['test1'] = 'A string';
    }

}
//Controller file
class Something extends MY_Controller{

      public function say_something()
      {
           $this->load->view('a view',$this->data);
      }
}
In this way, echoing $test1 in your view, works ?


Messages In This Thread
Global Strings! - by El Forum - 10-10-2010, 10:41 PM
Global Strings! - by El Forum - 10-10-2010, 11:59 PM
Global Strings! - by El Forum - 10-11-2010, 12:03 AM
Global Strings! - by El Forum - 10-12-2010, 06:12 AM
Global Strings! - by El Forum - 10-12-2010, 06:14 AM
Global Strings! - by El Forum - 10-12-2010, 06:17 AM
Global Strings! - by El Forum - 10-12-2010, 07:05 AM
Global Strings! - by El Forum - 10-12-2010, 07:27 AM
Global Strings! - by El Forum - 10-12-2010, 07:34 AM
Global Strings! - by El Forum - 10-12-2010, 07:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB