Welcome Guest, Not a member yet? Register   Sign In
Newbie question - global variable in codeigniter
#1

[eluser]Đỗ Thanh Tùng[/eluser]
Hi all, I'm a newbie. I have a problem when using variable in CodeIgniter.
I have a class like this :
Code:
Class abc Extends Controller {
    function abc () {
        parent::controller();
    }
    function a () {
        $this->something = 'something';
    }
    function b () {
        echo $this->something;
    }
}
when I run the function b like this : localhost/index.php/abc/a then localhost/index.php/abc/b
It return empty. How can I reuse the variable without send it's param again ?
Thanks for help.


Messages In This Thread
Newbie question - global variable in codeigniter - by El Forum - 10-18-2008, 04:45 AM
Newbie question - global variable in codeigniter - by El Forum - 10-18-2008, 05:14 AM
Newbie question - global variable in codeigniter - by El Forum - 10-18-2008, 05:36 AM
Newbie question - global variable in codeigniter - by El Forum - 10-18-2008, 05:41 AM
Newbie question - global variable in codeigniter - by El Forum - 10-18-2008, 05:50 AM
Newbie question - global variable in codeigniter - by El Forum - 10-18-2008, 05:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB