I have class something like that:
class Example{
private $a;
private $b;
function Example($user){
$this->a = $user;
$this->b = getsting(); //here is my problem
}
function getstring(){
return "string".$this->a; //here I have a class variable
}
}
How can I return value to $b?
Inside the class, you need to use
$this->to refer to other functions.P.S. It’s
getstring, notgetsting.