Hey there I\'m wondering how this is done as when I try the following code inside a function of a class it produces some php error which I can\'t catch
public $t
You're problem is with this line of code:
public $tasks;
$this->tasks = new tasks();
$this->tasks->test();
$this->showPanel();
The public
keyword is used in the definition of the class, not in a method of the class. In php, you don't even need to declare the member variable in the class, you can just do $this->tasks=new tasks()
and it gets added for you.