I have a controller with a couple of methods and they all have the same variable within them. I am looking for a way to have them share the same variable. What is the best way to do this?
What I have now:
class Example extends CI_Controller{
public function test{
$variable = "awesome";
}
public function demo{
$variable = "awesome";
}
}